davidker / unisys

Master repository for new changes to drivers/staging/unisys and drivers/visorbus
Other
2 stars 1 forks source link

Reorder function prototypes #88

Closed davidker closed 7 years ago

davidker commented 8 years ago

KanBoard-24499

Shouldn't need all these function prototypes reorder functions to get rid of them.

/* prototypes for attributes / static ssize_t toolaction_show(struct device dev, struct device_attribute attr, char buf); static ssize_t toolaction_store(struct device dev, struct device_attribute attr, const char *buf, size_t count);

Both prototypes not needed.

static DEVICE_ATTR_RW(toolaction);

Put this below the functions below.

static ssize_t boottotool_show(struct device dev, struct device_attribute attr, char buf); static ssize_t boottotool_store(struct device dev, struct device_attribute attr, const char buf, size_t count); static DEVICE_ATTR_RW(boottotool);

static ssize_t error_show(struct device dev, struct device_attribute attr, char buf); static ssize_t error_store(struct device dev, struct device_attribute attr, const char buf, size_t count); static DEVICE_ATTR_RW(error);

static ssize_t textid_show(struct device dev, struct device_attribute attr, char buf); static ssize_t textid_store(struct device dev, struct device_attribute attr, const char buf, size_t count); static DEVICE_ATTR_RW(textid);

static ssize_t remaining_steps_show(struct device dev, struct device_attribute attr, char buf); static ssize_t remaining_steps_store(struct device dev, struct device_attribute attr, const char buf, size_t count); static DEVICE_ATTR_RW(remaining_steps);

static ssize_t devicedisabled_store(struct device dev, struct device_attribute attr, const char *buf, size_t count); static DEVICE_ATTR_WO(devicedisabled);

static ssize_t deviceenabled_store(struct device dev, struct device_attribute attr, const char *buf, size_t count); static DEVICE_ATTR_WO(deviceenabled);

Odds are all of these prototypes aren't needed, then:

static struct attribute *visorchipset_install_attrs[] = { &dev_attr_toolaction.attr, &dev_attr_boottotool.attr, &dev_attr_error.attr, &dev_attr_textid.attr, &dev_attr_remaining_steps.attr, NULL };

You can move that lower.

...

/* Function prototypes / static void controlvm_respond(struct controlvm_message_header msg_hdr, int response); static void controlvm_respond_chipset_init( struct controlvm_message_header msg_hdr, int response, enum ultra_chipset_feature features); static void controlvm_respond_physdev_changestate( struct controlvm_message_header msg_hdr, int response, struct spar_segment_state state);

static void parser_done(struct parser_context *ctx);

I doubt you need all of those prototypes.

davidker commented 8 years ago

Updated githubissue-88-upstream-next branch with the changes. Note: There are some patches at the end of the series that isn't related to this issue, I need to clean that up. I just got busy trying to clean things up.

selltc commented 8 years ago

As you requested via IM, I will take a look at the most-recent 18 commits in githubissue-88-upstream-next, which are:

It looks to me like there are a handful of earlier patches that are also related to this issue, but I will ignore those for now. I'll make my comments directly in the commits themselves, and indicate below which commits I commented on.

selltc commented 8 years ago

This is my review of the oldest-9 commits; I will provide another comment to review the remaining commits. All of your code looks good, I just have a few minor nits with a few of the comments.

Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
selltc commented 8 years ago

This is my review of the remaining (newest) 9 commits, so this completes my review of the patches you requested. As before, all of your code looks good, I just have a few minor nits with a few of the comments.

Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
davidker commented 8 years ago

Tim can you look at the patches: 221803f782fb0988c0bca658a84f963608a595fc..e8e277768813f82d6a80f65a3ba3c5fc243cda2e, I miscounted when I asked you.

Thanks!

selltc commented 8 years ago

Sure; I'll look at these next:

selltc commented 8 years ago

This is my review of the remaining (oldest) 10 commits pointed out in the previous comment, so this completes my review of the patches you requested. As before, all of your code looks good, I just have a few minor nits with a few of the comments.

selltc commented 7 years ago

Greg committed these to staging-next on 9/20/2016:

selltc commented 7 years ago

Greg committed these to staging-next on 9/21/2016:

This completes the patches required for this issue.

selltc commented 7 years ago

Oops... missed a few other patches also committed by Greg to staging-next on 9/21/2016: