public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Aleksa Savic <savicaleksa83@gmail.com>, linux-hwmon@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
	Aleksa Savic <savicaleksa83@gmail.com>,
	stable@vger.kernel.org, Jack Doan <me@jackdoan.com>,
	Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: (aquacomputer_d5next) Add selective 200ms delay after sending ctrl report
Date: Sat, 29 Jul 2023 20:50:32 +0800	[thread overview]
Message-ID: <202307292011.c34ZumSF-lkp@intel.com> (raw)
In-Reply-To: <20230729112732.5516-1-savicaleksa83@gmail.com>

Hi Aleksa,

kernel test robot noticed the following build errors:

[auto build test ERROR on groeck-staging/hwmon-next]
[also build test ERROR on linus/master v6.5-rc3 next-20230728]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Aleksa-Savic/hwmon-aquacomputer_d5next-Add-selective-200ms-delay-after-sending-ctrl-report/20230729-193038
base:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
patch link:    https://lore.kernel.org/r/20230729112732.5516-1-savicaleksa83%40gmail.com
patch subject: [PATCH] hwmon: (aquacomputer_d5next) Add selective 200ms delay after sending ctrl report
config: arm-randconfig-r005-20230729 (https://download.01.org/0day-ci/archive/20230729/202307292011.c34ZumSF-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230729/202307292011.c34ZumSF-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307292011.c34ZumSF-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/hwmon/aquacomputer_d5next.c: In function 'aqc_send_ctrl_data':
>> drivers/hwmon/aquacomputer_d5next.c:674:17: error: implicit declaration of function 'msleep' [-Werror=implicit-function-declaration]
     674 |                 msleep(200);
         |                 ^~~~~~
   cc1: some warnings being treated as errors


vim +/msleep +674 drivers/hwmon/aquacomputer_d5next.c

   627	
   628	/* Expects the mutex to be locked */
   629	static int aqc_send_ctrl_data(struct aqc_data *priv)
   630	{
   631		int ret;
   632		u16 checksum;
   633	
   634		/* Checksum is not needed for Aquaero */
   635		if (priv->kind != aquaero) {
   636			/* Init and xorout value for CRC-16/USB is 0xffff */
   637			checksum = crc16(0xffff, priv->buffer + priv->checksum_start,
   638					 priv->checksum_length);
   639			checksum ^= 0xffff;
   640	
   641			/* Place the new checksum at the end of the report */
   642			put_unaligned_be16(checksum, priv->buffer + priv->checksum_offset);
   643		}
   644	
   645		/* Send the patched up report back to the device */
   646		ret = hid_hw_raw_request(priv->hdev, priv->ctrl_report_id, priv->buffer, priv->buffer_size,
   647					 HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
   648		if (ret < 0)
   649			return ret;
   650	
   651		/* The official software sends this report after every change, so do it here as well */
   652		ret = hid_hw_raw_request(priv->hdev, priv->secondary_ctrl_report_id,
   653					 priv->secondary_ctrl_report, priv->secondary_ctrl_report_size,
   654					 HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
   655		if (ret < 0)
   656			return ret;
   657	
   658		/*
   659		 * Wait 200ms before returning to make sure that the device actually processed both reports
   660		 * and saved ctrl data to memory. Otherwise, an aqc_get_ctrl_data() call made shortly after
   661		 * may fail with -EPIPE because the device is still busy and can't provide data. This can
   662		 * happen when userspace tools, such as fancontrol or liquidctl, write to sysfs entries in
   663		 * quick succession.
   664		 *
   665		 * 200ms was found to be the sweet spot between fixing the issue and not significantly
   666		 * prolonging the call. Quadro, Octo, D5 Next and Aquaero are currently known to be
   667		 * affected.
   668		 */
   669		switch (priv->kind) {
   670		case quadro:
   671		case octo:
   672		case d5next:
   673		case aquaero:
 > 674			msleep(200);
   675			break;
   676		default:
   677			break;
   678		}
   679	
   680		return ret;
   681	}
   682	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2023-07-29 12:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-29 11:27 [PATCH] hwmon: (aquacomputer_d5next) Add selective 200ms delay after sending ctrl report Aleksa Savic
2023-07-29 12:50 ` kernel test robot [this message]
2023-07-29 13:44 ` Guenter Roeck
2023-07-29 13:49   ` Aleksa Savic

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=202307292011.c34ZumSF-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=me@jackdoan.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=savicaleksa83@gmail.com \
    --cc=stable@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