From: Jani Nikula <jani.nikula@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [RESEND] drm/i915/syncmap: squelch a sparse warning
Date: Mon, 04 Dec 2023 12:12:13 +0200 [thread overview]
Message-ID: <87ttoy2s5e.fsf@intel.com> (raw)
In-Reply-To: <ZWePMkmVHaJ1NdL8@intel.com>
On Wed, 29 Nov 2023, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> On Wed, Nov 29, 2023 at 07:35:06PM +0200, Jani Nikula wrote:
>> The code is fine, really, but tweak it to get rid of the sparse warning:
>>
>> drivers/gpu/drm/i915/selftests/i915_syncmap.c:80:54: warning: dubious: x | !y
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> I always disliked the '!!' magic anyway,
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Thanks, pushed.
>
>> ---
>> drivers/gpu/drm/i915/selftests/i915_syncmap.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/selftests/i915_syncmap.c b/drivers/gpu/drm/i915/selftests/i915_syncmap.c
>> index 47f4ae18a1ef..88fa845e9f4a 100644
>> --- a/drivers/gpu/drm/i915/selftests/i915_syncmap.c
>> +++ b/drivers/gpu/drm/i915/selftests/i915_syncmap.c
>> @@ -77,7 +77,7 @@ __sync_print(struct i915_syncmap *p,
>> for_each_set_bit(i, (unsigned long *)&p->bitmap, KSYNCMAP) {
>> buf = __sync_print(__sync_child(p)[i], buf, sz,
>> depth + 1,
>> - last << 1 | !!(p->bitmap >> (i + 1)),
>> + last << 1 | ((p->bitmap >> (i + 1)) ? 1 : 0),
>> i);
>> }
>> }
>> --
>> 2.39.2
>>
--
Jani Nikula, Intel
next prev parent reply other threads:[~2023-12-04 10:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-29 17:35 [Intel-gfx] [RESEND] drm/i915/syncmap: squelch a sparse warning Jani Nikula
2023-11-29 19:21 ` Rodrigo Vivi
2023-12-04 10:12 ` Jani Nikula [this message]
2023-11-30 5:23 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/syncmap: squelch a sparse warning (rev2) Patchwork
2023-11-30 5:42 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-11-30 8:06 ` Jani Nikula
2023-12-01 19:45 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/syncmap: squelch a sparse warning (rev3) Patchwork
2023-12-01 20:26 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-12-03 3:21 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2023-05-16 8:00 [Intel-gfx] [RESEND] drm/i915/syncmap: squelch a sparse warning Jani Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ttoy2s5e.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.