From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Cao, Bingbu" <bingbu.cao@intel.com>
Cc: "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"sakari.ailus@linux.intel.com" <sakari.ailus@linux.intel.com>,
"djrscally@gmail.com" <djrscally@gmail.com>,
"bingbu.cao@linux.intel.com" <bingbu.cao@linux.intel.com>
Subject: Re: [PATCH] media: ipu3-cio2: support multiple sensors and VCMs with HID name
Date: Mon, 6 Mar 2023 18:35:10 +0200 [thread overview]
Message-ID: <ZAYWPpcjOghZ5L33@smile.fi.intel.com> (raw)
In-Reply-To: <DM8PR11MB565375ACA9BECCB175EE931199B69@DM8PR11MB5653.namprd11.prod.outlook.com>
On Mon, Mar 06, 2023 at 01:33:30PM +0000, Cao, Bingbu wrote:
> > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Sent: Monday, March 6, 2023 19:27
> > On Fri, Mar 03, 2023 at 10:44:32PM +0800, bingbu.cao@intel.com wrote:
...
> > > + if (sensor->ssdb.vcmtype) {
> > > + scnprintf(vcm_name, sizeof(vcm_name), "%s-%u",
> > > + cio2_vcm_types[sensor->ssdb.vcmtype - 1],
> > > + sensor->ssdb.link);
> >
> > Is using 'c' variant a cargo cult? Otherwise explain, why dropping the
> > last part of the number is not a problem.
>
> Sorry, I can't understand. What is cargo cult?
Use of sCnprintf(). I.o.w. can you explain the point of using it instead of
simply snprintf()?
> > > + nodes[SWNODE_VCM] = NODE_VCM(vcm_name);
> > > + }
...
> > > + scnprintf(sensor->name, sizeof(sensor->name), "%s-%u",
> > > + cfg->hid, sensor->ssdb.link);
Ditto.
...
> > > - char name[ACPI_ID_LEN];
> > > + char name[ACPI_ID_LEN + 4];
> >
> > Why 4 is chosen? This needs an explanation.
>
> 'link' is u8, so it is supposed to be max 4 characters along with '-'.
It should be mentioned somewhere.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-03-06 16:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-03 14:44 [PATCH] media: ipu3-cio2: support multiple sensors and VCMs with HID name bingbu.cao
2023-03-06 11:26 ` Andy Shevchenko
2023-03-06 13:33 ` Cao, Bingbu
2023-03-06 16:35 ` Andy Shevchenko [this message]
2023-03-07 2:43 ` Bingbu Cao
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=ZAYWPpcjOghZ5L33@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bingbu.cao@intel.com \
--cc=bingbu.cao@linux.intel.com \
--cc=djrscally@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox