public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Maximilian Luz <luzmaximilian@gmail.com>,
	Hans de Goede <hdegoede@redhat.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	Maximilian Luz <luzmaximilian@gmail.com>,
	Mark Gross <mgross@linux.intel.com>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/7] platform/surface: aggregator: Allow enabling of events without notifiers
Date: Sat, 5 Jun 2021 04:51:42 +0800	[thread overview]
Message-ID: <202106050428.B781DNxY-lkp@intel.com> (raw)
In-Reply-To: <20210604134755.535590-3-luzmaximilian@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5186 bytes --]

Hi Maximilian,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.13-rc4 next-20210604]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Maximilian-Luz/platform-surface-aggregator-Extend-user-space-interface-for-events/20210604-215134
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f88cd3fb9df228e5ce4e13ec3dbad671ddb2146e
config: x86_64-randconfig-r016-20210604 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 5c0d1b2f902aa6a9cf47cc7e42c5b83bb2217cf9)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/1d43dd8c1ca610c171da9a73c4122752f7cfd81d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Maximilian-Luz/platform-surface-aggregator-Extend-user-space-interface-for-events/20210604-215134
        git checkout 1d43dd8c1ca610c171da9a73c4122752f7cfd81d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/platform/surface/aggregator/controller.c:2245:6: warning: variable 'status' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           if (entry->refcount == 0) {
               ^~~~~~~~~~~~~~~~~~~~
   drivers/platform/surface/aggregator/controller.c:2250:9: note: uninitialized use occurs here
           return status;
                  ^~~~~~
   drivers/platform/surface/aggregator/controller.c:2245:2: note: remove the 'if' if its condition is always true
           if (entry->refcount == 0) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/platform/surface/aggregator/controller.c:2231:12: note: initialize the variable 'status' to silence this warning
           int status;
                     ^
                      = 0
   1 warning generated.
--
>> drivers/platform/surface/aggregator/controller.c:2227: warning: expecting prototype for ssam_nf_refcount_enable(). Prototype was for ssam_nf_refcount_disable_free() instead


vim +2245 drivers/platform/surface/aggregator/controller.c

  2200	
  2201	/**
  2202	 * ssam_nf_refcount_enable() - Disable event for reference count entry if it is
  2203	 * no longer in use and free the corresponding entry.
  2204	 * @ctrl:  The controller to disable the event on.
  2205	 * @entry: The reference count entry for the event to be disabled.
  2206	 * @flags: The flags used for enabling the event on the EC.
  2207	 *
  2208	 * If the reference count equals zero, i.e. the event is no longer requested by
  2209	 * any client, the event will be disabled and the corresponding reference count
  2210	 * entry freed. The reference count entry must not be used any more after a
  2211	 * call to this function.
  2212	 *
  2213	 * Also checks if the flags used for disabling the event match the flags used
  2214	 * for enabling the event and warns if they do not (regardless of reference
  2215	 * count).
  2216	 *
  2217	 * This does not modify the reference count itself, which is done with
  2218	 * ssam_nf_refcount_inc() / ssam_nf_refcount_dec().
  2219	 *
  2220	 * Note: ``nf->lock`` must be held when calling this function.
  2221	 *
  2222	 * Return: Returns zero on success. If the event is disabled by this call,
  2223	 * returns the status of the event-enable EC command.
  2224	 */
  2225	static int ssam_nf_refcount_disable_free(struct ssam_controller *ctrl,
  2226						 struct ssam_nf_refcount_entry *entry, u8 flags)
> 2227	{
  2228		const struct ssam_event_registry reg = entry->key.reg;
  2229		const struct ssam_event_id id = entry->key.id;
  2230		struct ssam_nf *nf = &ctrl->cplt.event.notif;
  2231		int status;
  2232	
  2233		lockdep_assert_held(&nf->lock);
  2234	
  2235		ssam_dbg(ctrl, "disabling event (reg: %#04x, tc: %#04x, iid: %#04x, rc: %d)\n",
  2236			 reg.target_category, id.target_category, id.instance, entry->refcount);
  2237	
  2238		if (entry->flags != flags) {
  2239			ssam_warn(ctrl,
  2240				  "inconsistent flags when disabling event: got %#04x, expected %#04x (reg: %#04x, tc: %#04x, iid: %#04x)\n",
  2241				  flags, entry->flags, reg.target_category, id.target_category,
  2242				  id.instance);
  2243		}
  2244	
> 2245		if (entry->refcount == 0) {
  2246			status = ssam_ssh_event_disable(ctrl, reg, id, flags);
  2247			kfree(entry);
  2248		}
  2249	
  2250		return status;
  2251	}
  2252	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33838 bytes --]

  parent reply	other threads:[~2021-06-04 20:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 13:47 [PATCH v2 0/7] platform/surface: aggregator: Extend user-space interface for events Maximilian Luz
2021-06-04 13:47 ` [PATCH v2 1/7] platform/surface: aggregator: Allow registering notifiers without enabling events Maximilian Luz
2021-06-04 13:47 ` [PATCH v2 2/7] platform/surface: aggregator: Allow enabling of events without notifiers Maximilian Luz
2021-06-04 20:13   ` Hans de Goede
2021-06-04 20:22     ` Maximilian Luz
2021-06-04 20:51   ` kernel test robot [this message]
2021-06-04 13:47 ` [PATCH v2 3/7] platform/surface: aggregator: Update copyright Maximilian Luz
2021-06-04 13:47 ` [PATCH v2 4/7] platform/surface: aggregator_cdev: Add support for forwarding events to user-space Maximilian Luz
2021-06-04 13:47 ` [PATCH v2 5/7] platform/surface: aggregator_cdev: Allow enabling of events from user-space Maximilian Luz
2021-06-04 13:47 ` [PATCH v2 6/7] platform/surface: aggregator_cdev: Add lockdep support Maximilian Luz
2021-06-04 13:47 ` [PATCH v2 7/7] docs: driver-api: Update Surface Aggregator user-space interface documentation Maximilian Luz
2021-06-04 20:18 ` [PATCH v2 0/7] platform/surface: aggregator: Extend user-space interface for events 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=202106050428.B781DNxY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=hdegoede@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luzmaximilian@gmail.com \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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