Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1710887
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] irq_work: improve the flag definitions |
| Date | 2017-08-14 14:20 +0200 |
| Message-ID | <uemvD-42v-11@gated-at.bofh.it> (permalink) |
| References | <uemci-3H5-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Aug 14, 2017 at 2:56 PM, Bartosz Golaszewski <brgl@bgdev.pl> wrote: > IRQ_WORK_FLAGS is defined simply to 3UL. This is confusing as it > says nothing about its purpose. Define IRQ_WORK_FLAGS as a bitwise > OR of IRQ_WORK_PENDING and IRQ_WORK_BUSY. > > While we're at it: use the BIT() macro for all flags. > +#define IRQ_WORK_PENDING BIT(0) > +#define IRQ_WORK_BUSY BIT(1) > +#define IRQ_WORK_FLAGS (IRQ_WORK_PENDING | IRQ_WORK_BUSY) I dunno which style is preferred, though I would go with simple GENMASK() here, as all definitions right on left :-) Parameters of GENMASK will show last-first entries and can be easily decoded. Although there are only two for now. -- With Best Regards, Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] irq_work: improve the flag definitions Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-14 14:00 +0200
Re: [PATCH] irq_work: improve the flag definitions Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-08-14 14:20 +0200
Re: [PATCH] irq_work: improve the flag definitions Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-14 19:20 +0200
Re: [PATCH] irq_work: improve the flag definitions Bartosz Golaszewski <brgl@bgdev.pl> - 2017-08-15 11:20 +0200
csiph-web