Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1537067
| From | Laurentiu Tudor <laurentiu.tudor@nxp.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 4/9] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs |
| Date | 2016-12-06 16:50 +0100 |
| Message-ID | <sLqai-3UD-207@gated-at.bofh.it> (permalink) |
| References | <sJVBw-3XH-23@gated-at.bofh.it> <sJXjX-58s-37@gated-at.bofh.it> <sJXjX-58s-35@gated-at.bofh.it> <sL8wG-Xr-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 12/05/2016 10:52 PM, Dan Carpenter wrote:
> On Fri, Dec 02, 2016 at 12:12:14PM +0000, Laurentiu Tudor wrote:
>>> +static inline bool dpaa2_sg_is_final(const struct dpaa2_sg_entry *sg)
>>> +{
>>> + return !!(le16_to_cpu(sg->format_offset) >> SG_FINAL_FLAG_SHIFT);
>>
>> In other places in this file we don't use the '!!' to convert to bool. Maybe we should drop it here too.
>
> I like the explicit "!!". I think it makes the code more obvious since
> all the information is on one line.
>
That's fine too, as long as we're doing it consistently in all the places.
---
Best Regards, Laurentiu
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH v3 4/9] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs Laurentiu Tudor <laurentiu.tudor@nxp.com> - 2016-12-02 15:50 +0100
Re: [PATCH v3 4/9] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs Dan Carpenter <dan.carpenter@oracle.com> - 2016-12-05 22:00 +0100
Re: [PATCH v3 4/9] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs Laurentiu Tudor <laurentiu.tudor@nxp.com> - 2016-12-06 16:50 +0100
csiph-web