devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Artur Rojek <contact@artur-rojek.eu>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Paul Cercueil <paul@crapouillou.net>,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: kbuild-all@lists.01.org, Heiko Stuebner <heiko@sntech.de>,
	Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Artur Rojek <contact@artur-rojek.eu>
Subject: Re: [PATCH v7 7/7] input: joystick: Add ADC attached joystick driver.
Date: Mon, 18 May 2020 07:19:26 +0800	[thread overview]
Message-ID: <202005180714.7Wys2VhN%lkp@intel.com> (raw)
In-Reply-To: <20200517194904.34758-7-contact@artur-rojek.eu>

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

Hi Artur,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on iio/togreg]
[also build test WARNING on input/next robh/for-next v5.7-rc5 next-20200515]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Artur-Rojek/dt-bindings-iio-adc-Convert-ingenic-adc-docs-to-YAML/20200518-035120
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: i386-allyesconfig (attached as .config)
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-193-gb8fad4bc-dirty
        # save the attached .config to linux build tree
        make C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

>> drivers/input/joystick/adc-joystick.c:49:39: sparse: sparse: cast to restricted __be16
>> drivers/input/joystick/adc-joystick.c:49:39: sparse: sparse: cast to restricted __be16
>> drivers/input/joystick/adc-joystick.c:49:39: sparse: sparse: cast to restricted __be16
>> drivers/input/joystick/adc-joystick.c:49:39: sparse: sparse: cast to restricted __be16
>> drivers/input/joystick/adc-joystick.c:51:39: sparse: sparse: cast to restricted __le16

vim +49 drivers/input/joystick/adc-joystick.c

    28	
    29	static int adc_joystick_handle(const void *data, void *private)
    30	{
    31		struct adc_joystick *joy = private;
    32		enum iio_endian endianness;
    33		int bytes, msb, val, i;
    34		bool sign;
    35	
    36		bytes = joy->chans[0].channel->scan_type.storagebits >> 3;
    37	
    38		for (i = 0; i < joy->num_chans; ++i) {
    39			endianness = joy->chans[i].channel->scan_type.endianness;
    40			msb = joy->chans[i].channel->scan_type.realbits - 1;
    41			sign = (tolower(joy->chans[i].channel->scan_type.sign) == 's');
    42	
    43			switch (bytes) {
    44			case 1:
    45				val = ((const u8 *)data)[i];
    46				break;
    47			case 2:
    48				if (endianness == IIO_BE)
  > 49					val = be16_to_cpu(((const u16 *)data)[i]);
    50				else if (endianness == IIO_LE)
  > 51					val = le16_to_cpu(((const u16 *)data)[i]);
    52				else /* IIO_CPU */
    53					val = ((const u16 *)data)[i];
    54				break;
    55			default:
    56				return -EINVAL;
    57			}
    58	
    59			val >>= joy->chans[i].channel->scan_type.shift;
    60			if (sign)
    61				val = sign_extend32(val, msb);
    62			else
    63				val &= GENMASK(msb, 0);
    64			input_report_abs(joy->input, joy->axes[i].code, val);
    65		}
    66	
    67		input_sync(joy->input);
    68	
    69		return 0;
    70	}
    71	

---
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: 72481 bytes --]

  reply	other threads:[~2020-05-17 23:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-17 19:48 [PATCH v7 1/7] dt-bindings: iio/adc: Convert ingenic-adc docs to YAML Artur Rojek
2020-05-17 19:48 ` [PATCH v7 2/7] IIO: Ingenic JZ47xx: Error check clk_enable calls Artur Rojek
2020-05-19 18:15   ` Jonathan Cameron
2020-05-17 19:49 ` [PATCH v7 3/7] IIO: Ingenic JZ47xx: Add xlate cb to retrieve correct channel idx Artur Rojek
2020-05-17 19:49 ` [PATCH v7 4/7] dt-bindings: iio/adc: Add touchscreen idx for JZ47xx SoC ADC Artur Rojek
2020-05-17 19:49 ` [PATCH v7 5/7] IIO: Ingenic JZ47xx: Add touchscreen mode Artur Rojek
2020-05-17 19:49 ` [PATCH v7 6/7] dt-bindings: input: Add docs for ADC driven joystick Artur Rojek
2020-05-18 14:22   ` Rob Herring
2020-05-17 19:49 ` [PATCH v7 7/7] input: joystick: Add ADC attached joystick driver Artur Rojek
2020-05-17 23:19   ` kbuild test robot [this message]
2020-05-19 18:25   ` Jonathan Cameron
2020-05-19 20:43   ` Andy Shevchenko
2020-05-19 21:02     ` Paul Cercueil
2020-05-26 21:34 ` [PATCH v7 1/7] dt-bindings: iio/adc: Convert ingenic-adc docs to YAML Rob Herring

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=202005180714.7Wys2VhN%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=contact@artur-rojek.eu \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=heiko@sntech.de \
    --cc=jic23@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=paul@crapouillou.net \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).