Commit d3ea6934 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'm68knommu-for-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu

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
...@@ -216,8 +216,10 @@ static int __init mcf_pci_init(void) ...@@ -216,8 +216,10 @@ static int __init mcf_pci_init(void)
/* Keep a virtual mapping to IO/config space active */ /* Keep a virtual mapping to IO/config space active */
iospace = (unsigned long) ioremap(PCI_IO_PA, PCI_IO_SIZE); iospace = (unsigned long) ioremap(PCI_IO_PA, PCI_IO_SIZE);
if (iospace == 0) if (iospace == 0) {
pci_free_host_bridge(bridge);
return -ENODEV; return -ENODEV;
}
pr_info("Coldfire: PCI IO/config window mapped to 0x%x\n", pr_info("Coldfire: PCI IO/config window mapped to 0x%x\n",
(u32) iospace); (u32) iospace);
......
...@@ -48,7 +48,6 @@ CONFIG_MTD_CFI_STAA=y ...@@ -48,7 +48,6 @@ CONFIG_MTD_CFI_STAA=y
CONFIG_MTD_ROM=y CONFIG_MTD_ROM=y
CONFIG_MTD_COMPLEX_MAPPINGS=y CONFIG_MTD_COMPLEX_MAPPINGS=y
CONFIG_MTD_PLATRAM=y CONFIG_MTD_PLATRAM=y
CONFIG_MTD_M25P80=y
CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPI_NOR=y
# CONFIG_INPUT_KEYBOARD is not set # CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_MOUSE is not set
......
...@@ -42,7 +42,7 @@ static inline int _access_ok(unsigned long addr, unsigned long size) ...@@ -42,7 +42,7 @@ static inline int _access_ok(unsigned long addr, unsigned long size)
__put_user_asm(__pu_err, __pu_val, ptr, l); \ __put_user_asm(__pu_err, __pu_val, ptr, l); \
break; \ break; \
case 8: \ case 8: \
memcpy(ptr, &__pu_val, sizeof (*(ptr))); \ memcpy((void __force *)ptr, &__pu_val, sizeof(*(ptr))); \
break; \ break; \
default: \ default: \
__pu_err = __put_user_bad(); \ __pu_err = __put_user_bad(); \
...@@ -60,7 +60,7 @@ extern int __put_user_bad(void); ...@@ -60,7 +60,7 @@ extern int __put_user_bad(void);
* aliasing issues. * aliasing issues.
*/ */
#define __ptr(x) ((unsigned long *)(x)) #define __ptr(x) ((unsigned long __user *)(x))
#define __put_user_asm(err,x,ptr,bwl) \ #define __put_user_asm(err,x,ptr,bwl) \
__asm__ ("move" #bwl " %0,%1" \ __asm__ ("move" #bwl " %0,%1" \
...@@ -85,7 +85,7 @@ extern int __put_user_bad(void); ...@@ -85,7 +85,7 @@ extern int __put_user_bad(void);
u64 l; \ u64 l; \
__typeof__(*(ptr)) t; \ __typeof__(*(ptr)) t; \
} __gu_val; \ } __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; \ (x) = __gu_val.t; \
break; \ break; \
} \ } \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment