Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1612546
| From | Jonathan Woithe <jwoithe@just42.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/8] platform/x86: fujitsu-laptop: move backlight input device setup to a separate function |
| Date | 2017-03-30 06:10 +0200 |
| Message-ID | <tqzzj-Cl-1@gated-at.bofh.it> (permalink) |
| References | <tn4V3-4Nu-5@gated-at.bofh.it> <tn4V3-4Nu-23@gated-at.bofh.it> <tqrV7-3aL-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Mar 29, 2017 at 12:54:15PM -0700, Darren Hart wrote: > On Mon, Mar 20, 2017 at 10:32:17AM +0100, Micha?? K??pie?? wrote: > > + > > + return error; > > This return path could be cleaned up a bit: > > error = input_register_device(input); > if (error) > input_free_device(input); > > return error; > > But, this driver uses this "error/return 0" pattern pretty consistently, whereas > most of the kernel uses ret instead of error, and will return ret on success and > failure, relying on it being 0 in the successful case. Over the whole driver, > we'd save several lines with the conversion and be more consistent with the rest > of the kernel. But, local consistency is important too. Jonathan, do you have a > preference for this driver? I have no strong preferences, except to say that clarity is important. As I eluded to a few minutes ago, I agree that there's scope to address error handling and there is a case to be made for bringing it into line with the rest of the kernel. I think this can be addressed in a separate patch series though. The present series under consideration doesn't make the situation any worse (it actually improves it in some places) and introduces worthwhile changes. As such I don't see that we gain anything by delaying it in order to address what is, at the end of the day, a separate concern. Regards jonathan
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH 1/8] platform/x86: fujitsu-laptop: move backlight input device setup to a separate function Darren Hart <dvhart@infradead.org> - 2017-03-29 22:00 +0200 Re: [PATCH 1/8] platform/x86: fujitsu-laptop: move backlight input device setup to a separate function Jonathan Woithe <jwoithe@just42.net> - 2017-03-30 06:10 +0200
csiph-web