Message ID | 1400512508-7530-8-git-send-email-dros@primarydata.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Weston Andros Adamson wrote: For consistency, remove argument names in function declarations This conflicts with the style guide: Chapter 6: Functions In function prototypes, include parameter names with their data types. Although this is not required by the C language, it is preferred in Linux because it is a simple way to add valuable information for the reader. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On May 19, 2014, at 11:29 AM, Jim Rees <rees@umich.edu> wrote: > Weston Andros Adamson wrote: > > For consistency, remove argument names in function declarations > > This conflicts with the style guide: Well, then so do many (most?) function declarations in nfs-land. > > Chapter 6: Functions > > In function prototypes, include parameter names with their data types. > Although this is not required by the C language, it is preferred in Linux > because it is a simple way to add valuable information for the reader. I personally disagree that function names provide “valuable information”. “struct page *page” -> “oh, it’s a page!” ;) I can just drop this patch if people don’t like it... -dros-- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Consistency often trumps style guidelines, and I have no strong objection to this change. Just wanted to point it out. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On May 19, 2014, at 12:36 PM, Jim Rees <rees@umich.edu> wrote: > Consistency often trumps style guidelines, and I have no strong objection to > this change. Just wanted to point it out. Right and I appreciate you pointing it out. I mistakenly thought I was following the guidelines! So, I can see how it’d be useful to have names when using basic types or when passing several arguments of the same type. Maybe we could just remove super redundant names (i.e. “struct page *page”)? On the other hand, maybe we don’t open this can of worms and I just drop this patch from the patchset.. -dros -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 4b48548..09ffb6a 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h @@ -95,32 +95,32 @@ struct nfs_pageio_descriptor { #define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags)) -extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx, - struct page *page, - struct nfs_page *last, - unsigned int offset, - unsigned int count); +extern struct nfs_page *nfs_create_request(struct nfs_open_context *, + struct page *, + struct nfs_page *, + unsigned int, + unsigned int); extern void nfs_release_request(struct nfs_page *); -extern void nfs_pageio_init(struct nfs_pageio_descriptor *desc, - struct inode *inode, - const struct nfs_pageio_ops *pg_ops, - const struct nfs_pgio_completion_ops *compl_ops, - const struct nfs_rw_ops *rw_ops, - size_t bsize, - int how); +extern void nfs_pageio_init(struct nfs_pageio_descriptor *, + struct inode *, + const struct nfs_pageio_ops *, + const struct nfs_pgio_completion_ops *, + const struct nfs_rw_ops *, + size_t, + int); extern int nfs_pageio_add_request(struct nfs_pageio_descriptor *, struct nfs_page *); extern int nfs_pageio_resend(struct nfs_pageio_descriptor *, struct nfs_pgio_header *); -extern void nfs_pageio_complete(struct nfs_pageio_descriptor *desc); +extern void nfs_pageio_complete(struct nfs_pageio_descriptor *); extern void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *, pgoff_t); -extern size_t nfs_generic_pg_test(struct nfs_pageio_descriptor *desc, - struct nfs_page *prev, - struct nfs_page *req); +extern size_t nfs_generic_pg_test(struct nfs_pageio_descriptor *, + struct nfs_page *, + struct nfs_page *); extern int nfs_wait_on_request(struct nfs_page *); -extern void nfs_unlock_request(struct nfs_page *req); +extern void nfs_unlock_request(struct nfs_page *); extern void nfs_unlock_and_release_request(struct nfs_page *); extern void nfs_page_group_lock(struct nfs_page *); extern void nfs_page_group_unlock(struct nfs_page *);
For consistency, remove argument names in function declarations Signed-off-by: Weston Andros Adamson <dros@primarydata.com> --- include/linux/nfs_page.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-)