summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/vio.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-05-18 19:03:07 -0700
committerDavid S. Miller <davem@davemloft.net>2014-05-18 19:03:07 -0700
commit311b8935ad4e13bac5880ae3f0c269b0c253d25f (patch)
treef44f4feaf7561e74ca14b2d6b992a9c2347d7a31 /arch/sparc/include/asm/vio.h
parentbf6569988a483b5bfa382bad4360460cf4ad8b12 (diff)
parent48d372164d1943a0d32d44ca43640a5f24fef979 (diff)
downloadop-kernel-dev-311b8935ad4e13bac5880ae3f0c269b0c253d25f.zip
op-kernel-dev-311b8935ad4e13bac5880ae3f0c269b0c253d25f.tar.gz
Merge branch 'sparc_sparse_fixes'
Sam Ravnborg says: ==================== sparc sparse fixes + diverse cleanup v1 => v2 - audit of all patches. I deliberately waited a while before doing so - in order to look at them with fresh eyes. - Fix bogus sbus() use found by davem in iommu.c - Split patch touching iommu.c and io-unit.c in two - Fix bogus sbus use in time_32 (sbus_readw => sbus_readl) - Dropped patch that touches signal_64.c __put_user() does many magic things and I could not convince myself that dropping a cast of a pointer to (u64) was correct. - Updated a few changelogs to be more precise/descriptive - In systbls.h rearrange include and move include to the common part - Updated cover letter (this mail) Fix build breakage of sparc32 in certain configurations Fix sparse warnings in sparc32. What is remaining: - "shift too big" warnings in the soft floating point code. This is too complex - so I dropped trying to fix these Fix sparse warnings in sparc64. What is remaining: - "shift too big" warnings in the soft floating point code (like sparc32) - pcr.c defines arch_irq_work_raise() which is also defined as __weak in common code. As I recall there are some issues with weak functions with prototypes so it is left as-is - signal32.c issue a lot of "cast removes address space of expression" This actually deserve an extra look - as I think this may be some code that mixes two sizes to __put_user() - viohs.c uses a variable length array - init_64.c reference vmemmap_free which is properly declared in common code but seems to be guarded by wrong ifdefs - signal_64.c mix with __user pointers and wrong casts None of the remaining sparse warnings looks simple to fix - and any hints how to proceed are appreciated. A lot of the sparse warnings are fixed by addding or moving function prototypes to common files. Many prototypes are for functions solely called from assembler so they are added only to shut up sparse. But there is also a lot of prototypes that had local declarations which are now visible both in the file where the function is defined and in the file where the function is used. Change all prototypes in sparc .h files so they do not use extern. This change touches a lot of files. Fix so we no longer assumes _NIG_WORDS can have more than one value, and add a build time check to catch if the value changes anyway. **The following patches require extra careful review:** [PATCH 07/34] sparc32: fix sparse warnings in sys_sparc_32.c The return type of a few syscalls has been changed for sparc32, to align with sparc64. I assume this is safe to do. [PATCH 08/34] sparc32: remove cast from output constraints in math asm statements [PATCH 09/34] sparc64: remove cast from output constraints in math asm statements I have not much experience with gcc inline assembler - so please check that this looks OK. A cast in the output section of the inline assembler is dropped - which should be OK. [PATCH 23/34] sparc64: clean up compat_sigset_t.seta handling This drops code that assumed _NSIG_WORDS could change. But as _NIG_WORDS are always constant drop this code. [PATCH 34/34] sparc64: fix sparse warnings in int_64.c Introduces some ugly ifdef in the code. Was not sure if there was a smarter way to do this. It looked like some code was executed in the !CONFIG_NEED_MULTIPLE_NODES case which is not required. For now the simple solution with ifdef was used. **The following patches touches files outside arch/sparc:** [PATCH 24/34] sparc64: fix sparse warning in tsb.c Touches kernel/sysctl.c - removes a few sparc64 specific lines [PATCH 27/34] sparc: fix sparse warnings in smp_32.c + smp_64.c Adds prototype for setup_profiling_timer to include/linux/profile.h. I could not find any obvious candidates to cc: on this patch ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/vio.h')
-rw-r--r--arch/sparc/include/asm/vio.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/arch/sparc/include/asm/vio.h b/arch/sparc/include/asm/vio.h
index 432afa8..e0f6c39 100644
--- a/arch/sparc/include/asm/vio.h
+++ b/arch/sparc/include/asm/vio.h
@@ -372,14 +372,14 @@ do { if (vio->debug & VIO_DEBUG_##TYPE) \
vio->vdev->channel_id, ## a); \
} while (0)
-extern int __vio_register_driver(struct vio_driver *drv, struct module *owner,
+int __vio_register_driver(struct vio_driver *drv, struct module *owner,
const char *mod_name);
/*
* vio_register_driver must be a macro so that KBUILD_MODNAME can be expanded
*/
#define vio_register_driver(driver) \
__vio_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)
-extern void vio_unregister_driver(struct vio_driver *drv);
+void vio_unregister_driver(struct vio_driver *drv);
static inline struct vio_driver *to_vio_driver(struct device_driver *drv)
{
@@ -391,21 +391,21 @@ static inline struct vio_dev *to_vio_dev(struct device *dev)
return container_of(dev, struct vio_dev, dev);
}
-extern int vio_ldc_send(struct vio_driver_state *vio, void *data, int len);
-extern void vio_link_state_change(struct vio_driver_state *vio, int event);
-extern void vio_conn_reset(struct vio_driver_state *vio);
-extern int vio_control_pkt_engine(struct vio_driver_state *vio, void *pkt);
-extern int vio_validate_sid(struct vio_driver_state *vio,
- struct vio_msg_tag *tp);
-extern u32 vio_send_sid(struct vio_driver_state *vio);
-extern int vio_ldc_alloc(struct vio_driver_state *vio,
- struct ldc_channel_config *base_cfg, void *event_arg);
-extern void vio_ldc_free(struct vio_driver_state *vio);
-extern int vio_driver_init(struct vio_driver_state *vio, struct vio_dev *vdev,
- u8 dev_class, struct vio_version *ver_table,
- int ver_table_size, struct vio_driver_ops *ops,
- char *name);
-
-extern void vio_port_up(struct vio_driver_state *vio);
+int vio_ldc_send(struct vio_driver_state *vio, void *data, int len);
+void vio_link_state_change(struct vio_driver_state *vio, int event);
+void vio_conn_reset(struct vio_driver_state *vio);
+int vio_control_pkt_engine(struct vio_driver_state *vio, void *pkt);
+int vio_validate_sid(struct vio_driver_state *vio,
+ struct vio_msg_tag *tp);
+u32 vio_send_sid(struct vio_driver_state *vio);
+int vio_ldc_alloc(struct vio_driver_state *vio,
+ struct ldc_channel_config *base_cfg, void *event_arg);
+void vio_ldc_free(struct vio_driver_state *vio);
+int vio_driver_init(struct vio_driver_state *vio, struct vio_dev *vdev,
+ u8 dev_class, struct vio_version *ver_table,
+ int ver_table_size, struct vio_driver_ops *ops,
+ char *name);
+
+void vio_port_up(struct vio_driver_state *vio);
#endif /* _SPARC64_VIO_H */
OpenPOWER on IntegriCloud