Commit d3ea6934 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull m68knommu updates from Greg Ungerer:

 - casting clean up in the user access macros

 - memory leak on error case fix for PCI probing

 - update of a defconfig

* tag 'm68knommu-for-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
  m68k,nommu: fix implicit cast from __user in __{get,put}_user_asm()
  m68k,nommu: add missing __user in uaccess' __ptr() macro
  m68k: Drop CONFIG_MTD_M25P80 in stmark2_defconfig
  m68k/PCI: Fix a memory leak in an error handling path
parents 2dca74a4 9e2b6ed4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -216,8 +216,10 @@ static int __init mcf_pci_init(void)

	/* Keep a virtual mapping to IO/config space active */
	iospace = (unsigned long) ioremap(PCI_IO_PA, PCI_IO_SIZE);
	if (iospace == 0)
	if (iospace == 0) {
		pci_free_host_bridge(bridge);
		return -ENODEV;
	}
	pr_info("Coldfire: PCI IO/config window mapped to 0x%x\n",
		(u32) iospace);

+0 −1
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ CONFIG_MTD_CFI_STAA=y
CONFIG_MTD_ROM=y
CONFIG_MTD_COMPLEX_MAPPINGS=y
CONFIG_MTD_PLATRAM=y
CONFIG_MTD_M25P80=y
CONFIG_MTD_SPI_NOR=y
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
+3 −3
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ static inline int _access_ok(unsigned long addr, unsigned long size)
	__put_user_asm(__pu_err, __pu_val, ptr, l);	\
	break;						\
    case 8:						\
	memcpy(ptr, &__pu_val, sizeof (*(ptr))); \
	memcpy((void __force *)ptr, &__pu_val, sizeof(*(ptr))); \
	break;						\
    default:						\
	__pu_err = __put_user_bad();			\
@@ -60,7 +60,7 @@ extern int __put_user_bad(void);
 * aliasing issues.
 */

#define __ptr(x) ((unsigned long *)(x))
#define __ptr(x) ((unsigned long __user *)(x))

#define __put_user_asm(err,x,ptr,bwl)				\
	__asm__ ("move" #bwl " %0,%1"				\
@@ -85,7 +85,7 @@ extern int __put_user_bad(void);
	    u64 l;						\
	    __typeof__(*(ptr)) t;				\
	} __gu_val;						\
	memcpy(&__gu_val.l, ptr, sizeof(__gu_val.l));		\
	memcpy(&__gu_val.l, (const void __force *)ptr, sizeof(__gu_val.l)); \
	(x) = __gu_val.t;					\
	break;							\
    }								\