Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1674549
| From | Frans Klaver <fransklaver@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] staging: sm750fb: always take the lock |
| Date | 2017-06-26 11:20 +0200 |
| Message-ID | <tWylA-tB-19@gated-at.bofh.it> (permalink) |
| References | <tWv4l-6Jc-5@gated-at.bofh.it> <tWylA-tB-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jun 26, 2017 at 11:11 AM, Geert Uytterhoeven <geert@linux-m68k.org> wrote: > On Mon, Jun 26, 2017 at 7:45 AM, AbdAllah-MEZITI > <abdallah.meziti.pro@gmail.com> wrote: >> This patch >> - will always take the lock > > Why? > > "The current code only takes the lock if multiple instances are in use. > This is error-prone, and confuses static analyzers. > As taking the lock in case of a single instance is harmful and cheap, > change the code to always take the lock." I would argue that it's not harmful, lest people get confused about it. And I agree that this explanation is much more useful than just mentioning the warnings that you saw. Thanks, Frans
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] staging: sm750fb: always take the lock AbdAllah-MEZITI <abdallah.meziti.pro@gmail.com> - 2017-06-26 07:50 +0200
Re: [PATCH] staging: sm750fb: always take the lock Frans Klaver <fransklaver@gmail.com> - 2017-06-26 08:40 +0200
Re: [PATCH] staging: sm750fb: always take the lock Geert Uytterhoeven <geert@linux-m68k.org> - 2017-06-26 11:20 +0200
Re: [PATCH] staging: sm750fb: always take the lock Frans Klaver <fransklaver@gmail.com> - 2017-06-26 11:20 +0200
Re: [PATCH] staging: sm750fb: always take the lock Geert Uytterhoeven <geert@linux-m68k.org> - 2017-06-26 11:30 +0200
csiph-web