All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	igt-dev@lists.freedesktop.org,
	Ashutosh Dixit <ashutosh.dixit@intel.com>,
	Andi Shyti <andi.shyti@intel.com>,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>,
	Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>,
	Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 2/3] lib/igt_sysfs: Add RPS sysfs helpers
Date: Mon, 25 Apr 2022 16:15:39 -0700	[thread overview]
Message-ID: <874k2g7o10.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <YmF9EXfaWmG4vPin@kamilkon-DESK1>

On Thu, 21 Apr 2022 08:49:37 -0700, Kamil Konieczny wrote:
>
> Hi Ashutosh,

Hi Kamil,

> > +/**
> > + * igt_sysfs_dir_id_to_name:
> > + * @dir: sysfs directory fd
> > + * @id: sysfs attribute id
> > + *
> > + * Returns attribute name corresponding to attribute id in either the
> > + * per-gt or legacy per-device sysfs
> > + *
> > + * Returns:
> > + * Attribute name in sysfs
> > + */
> > +const char *igt_sysfs_dir_id_to_name(int dir, enum i915_attr_id id)
> > +{
> > +	igt_assert(id < SYSFS_NUM_ATTR);
>
> What about id < 0 ?

Changed to "igt_assert((uint32_t) id < SYSFS_NUM_ATTR);

> > +
> > +	if (igt_sysfs_has_attr(dir, i915_attr_name[GT][id]))
> > +		return i915_attr_name[GT][id];
> > +	else if (igt_sysfs_has_attr(dir, i915_attr_name[RPS][id]))
> ------- ^
> s/else //

Done.

> > +		return i915_attr_name[RPS][id];
> > +	else
> ------- ^
> drop this else here, checkpatch warn:
> WARNING: else is not generally useful after a break or return
> #102: FILE: lib/igt_sysfs.c:118:
> +               return i915_attr_name[RPS][id];
> +       else
>
> > +		igt_assert_f(0, "Invalid sysfs dir\n");
>
> and align this assert.

Done.

>
> Rest looks good, with that fixed you can add my r-b tag.

Thanks, merged with the above changes.

  reply	other threads:[~2022-04-25 23:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20  6:12 [igt-dev] [PATCH i-g-t 1/3] lib/igt_sysfs: Add helpers to iterate over GTs Ashutosh Dixit
2022-04-20  6:12 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_sysfs: Add RPS sysfs helpers Ashutosh Dixit
2022-04-21 15:49   ` Kamil Konieczny
2022-04-25 23:15     ` Dixit, Ashutosh [this message]
2022-04-20  6:12 ` [igt-dev] [PATCH i-g-t 3/3] tests/i915_pm_disag_freq: New test for media freq factor Ashutosh Dixit
2022-04-21 17:00   ` Kamil Konieczny
2022-04-26 19:45     ` Dixit, Ashutosh
2022-04-22 16:15   ` Kamil Konieczny
2022-04-26 19:46     ` Dixit, Ashutosh
2022-04-20  7:09 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/3] lib/igt_sysfs: Add helpers to iterate over GTs Patchwork
2022-04-21 11:05 ` [igt-dev] [PATCH i-g-t 1/3] " Dandamudi, Priyanka
  -- strict thread matches above, loose matches on Subject: below --
2022-04-13 17:27 [igt-dev] [PATCH i-g-t 1/2] lib/igt_sysfs: Add helpers to iterate over gts Ashutosh Dixit
2022-04-20  5:02 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_sysfs: Add RPS sysfs helpers Ashutosh Dixit

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=874k2g7o10.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=andi.shyti@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=sujaritha.sundaresan@intel.com \
    --cc=tvrtko.ursulin@intel.com \
    --cc=umesh.nerlige.ramappa@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.