All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy@kernel.org>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: Benoit Parrot <bparrot@ti.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Bingbu Cao <bingbu.cao@intel.com>,
	Tianshu Qiu <tian.shu.qiu@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Hans de Goede <hdegoede@redhat.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev
Subject: Re: [PATCH 1/3] media: ti: cal: Use str_up_down()
Date: Fri, 27 Sep 2024 12:56:32 +0300	[thread overview]
Message-ID: <ZvaBUJCPpCAHY8GC@smile.fi.intel.com> (raw)
In-Reply-To: <20240927-cocci-6-12-v1-1-a318d4e6a19d@chromium.org>

On Fri, Sep 27, 2024 at 09:42:13AM +0000, Ricardo Ribalda wrote:
> The str_up_down() helper simplifies the code and fixes the following cocci
> warning:
> 
> drivers/media/platform/ti/cal/cal-camerarx.c:194:3-9: opportunity for str_up_down(enable)

...

>  	if (i == 10)
>  		phy_err(phy, "Failed to power %s complexio\n",
> -			enable ? "up" : "down");
> +			str_up_down(enable);

Now can fit one line

		phy_err(phy, "Failed to power %s complexio\n", str_up_down(enable));

But have you compiled it?

>  }

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-09-27  9:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-27  9:42 [PATCH 0/3] media: static-analyzers: Fix 6.12-rc1 cocci warnings Ricardo Ribalda
2024-09-27  9:42 ` [PATCH 1/3] media: ti: cal: Use str_up_down() Ricardo Ribalda
2024-09-27  9:56   ` Andy Shevchenko [this message]
2024-09-27  9:42 ` [PATCH 2/3] staging: media: ipu3:Use str_down_up() Ricardo Ribalda
2024-09-27  9:55   ` Andy Shevchenko
2024-09-27  9:42 ` [PATCH 3/3] media: atomisp: Use max() macros Ricardo Ribalda
2024-09-27  9:54   ` Andy Shevchenko
2024-09-27 10:00   ` Hans Verkuil
2024-09-29 21:34   ` David Laight
2024-09-30  8:27     ` Hans de Goede

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=ZvaBUJCPpCAHY8GC@smile.fi.intel.com \
    --to=andy@kernel.org \
    --cc=bingbu.cao@intel.com \
    --cc=bparrot@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=ribalda@chromium.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tian.shu.qiu@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.