Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp405701lqj; Sun, 2 Jun 2024 04:11:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWWtNHWxRiL19XPRam7zJPMSb+2bttmoI77E3+hKOKRHMkkr+bph7GfN6+9pQTdJmq7Vg4uDq5GtikRJJqySPQIZ9mfcQA0zXFPo1qEQA== X-Google-Smtp-Source: AGHT+IGMqqgv8YgBVcGFF/VTt5xZ9msSHy4Ke1lDFN4TlC8IaNgEeDzqjlRZZhpPsoOAKAeBtj2E X-Received: by 2002:a9d:6747:0:b0:6f8:ed54:8361 with SMTP id 46e09a7af769-6f911f3e011mr6980757a34.17.1717326677363; Sun, 02 Jun 2024 04:11:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717326677; cv=pass; d=google.com; s=arc-20160816; b=aFpfDSzyDWfniSWwnYj7JVZuuMBlaiK5msbZ709Pe/ennq9S9iWA4xqEFEDvfhY94r IjgkXqtDu955cWHzS9E6Bg7OySSgg4fZBS8MNUQNvfSmdhWzWiKEYZ03W2TqTXu5+9+3 FD4hR4GAn35kxxDtfpdPTKC8AHSk/EHPK7aMGTHyVb98l0Yy6llh7Efd5saJEvp7LVMp khhJ4lDcU4LQBI3iixXrwXR9R+Q392HuUo2HHh1mASC96/9XxRNNaBSeSjtAakXsJrIk mPpbvrPph+uzAT6HvILsQUN4GnPqQ43zJGpDPrr9zmdonmkoZ7laiagBwBLBxDAz9WCA N2BQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=L5bI8pqXn1DLFXpJMHCmwL89fDN9Hak8JL3NY8X+2AY=; fh=/FkquuAWvbH50Yhf5DiqpTGnwOUpRgtMB2dNw5nhISU=; b=WRiQ9DAa01kQiGvnNcW5yDU045VBQk6VqOn/fB0Qk2jieNIjj9V4cxRNrE6hrZMTel hyYWK3OirJax9R0n/3SQyMcm5lNE0PWOvpMsCUGphrNtdSbmh3NAcPRNrNreCzdf2omi Fi8eVNMTyL+oi5GYE5PvPWUvgECmsmYXXJl3q74Zzzk/X/W9oAu3Ym8SF+hWXNXNDkmO oSICYBiFgPiX7lh2WIM/pY+DYq/19jpi2pF1pUWzDP9dKLECi2gGtjd3/ckpDSGQC+jl p5oBirxgpMftK5dRg3uXbI48GIUMNx5mzqNWzuaI6ez7wcwPkve2N2sNPw7UwB1mk7lj W/lQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jDFyT22j; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-198205-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198205-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43ff2466934si62424101cf.371.2024.06.02.04.11.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 04:11:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198205-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jDFyT22j; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-198205-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198205-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DCE151C209B6 for ; Sun, 2 Jun 2024 11:11:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C398A383A3; Sun, 2 Jun 2024 11:11:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jDFyT22j" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C89C72628D; Sun, 2 Jun 2024 11:11:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717326666; cv=none; b=idZZh7wkxQgZfNNalQeW9Rfubel9RQ+87bLCy+cTd06hACT1HKqE0xVUPRvRhlC/o88ZodaUkIotUTe3VbuFigm/TI6rRd6uRksFOnjfbg6sEzgf5fb+tHRQgWoA0V4drrxQlueATvD2StriDCV51H5UVQYxFL9P3kmXtqThlL4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717326666; c=relaxed/simple; bh=/f1+buvY2wKNB3Djb3Xp6A4nNR8eZ/0oK02yL2xOeWU=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GUZDPLaiJUu5B7Jwc87gqzFr0PpfNbJR0mqTQdQvYj9pf0iv3hZmBJt/zWalin7Q9nVUSSzpJbI9tkgQitBs8eOXRVEPpUMtrXlBNWGtkhfC92i49atKtiTb0/bdGHwRC+aw97m2nBdiLc124HaDzdckrAZitd/I3yAGiKKXzAc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jDFyT22j; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA938C2BBFC; Sun, 2 Jun 2024 11:11:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717326666; bh=/f1+buvY2wKNB3Djb3Xp6A4nNR8eZ/0oK02yL2xOeWU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jDFyT22jbQ67clyrNrxdbhD7xaOliiWs4+SseiiLSu6Nr0PNS27VBY119EkzGc9TE 7Rei21olEOO6ncvQygef1eiqCLm2Fb18+625aQnIwYgXSWQUCTOuMoOhfN2QhOVOS6 M9wUOiqohMZ4mUpAja96KeI/BN0hfeit+8H7kiMvjZ0qqcGhXf3V0rzjWmhrdtsgw3 bQrFZ3QcGwVDeG4F8HGxSCFfOrcUUmMkKWk8pWVtOL6XJlcrgYKJfoR0tkAzUo0bhy bBG08jKYHe0X4eFuxSClGILiZTQtGNmidUROA5tU2cGl1tM1Bm96Q3oE00TRgSevJS HpzPw7jIlw/Yw== Date: Sun, 2 Jun 2024 12:10:51 +0100 From: Jonathan Cameron To: Dan Carpenter Cc: oe-kbuild@lists.linux.dev, Ramona Gradinariu , linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh@kernel.org, nuno.sa@analog.com, lkp@intel.com, oe-kbuild-all@lists.linux.dev Subject: Re: [PATCH v5 9/9] drivers: iio: imu: Add support for adis1657x family Message-ID: <20240602121051.2f322667@jic23-huawei> In-Reply-To: References: <20240527142618.275897-10-ramona.bolboaca13@gmail.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.42; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 29 May 2024 17:32:40 +0300 Dan Carpenter wrote: > Hi Ramona, >=20 > kernel test robot noticed the following build warnings: >=20 > https://git-scm.com/docs/git-format-patch#_base_tree_information] >=20 > url: https://github.com/intel-lab-lkp/linux/commits/Ramona-Gradinariu/= dt-bindings-iio-imu-Add-ADIS16501-compatibles/20240527-230203 > base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git tog= reg > patch link: https://lore.kernel.org/r/20240527142618.275897-10-ramona.= bolboaca13%40gmail.com > patch subject: [PATCH v5 9/9] drivers: iio: imu: Add support for adis1657= x family > config: x86_64-randconfig-161-20240528 (https://download.01.org/0day-ci/a= rchive/20240528/202405281539.EXGy0dhk-lkp@intel.com/config) > compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0 >=20 > If you fix the issue in a separate patch/commit (i.e. not just a new vers= ion of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Reported-by: Dan Carpenter > | Closes: https://lore.kernel.org/r/202405281539.EXGy0dhk-lkp@intel.com/ >=20 > smatch warnings: > drivers/iio/imu/adis16475.c:1608 adis16475_push_single_sample() warn: mis= sing error code? 'ret' >=20 > vim +/ret +1608 drivers/iio/imu/adis16475.c >=20 > c49e2871e50119 Ramona Gradinariu 2024-05-27 1577 static int adis16475_p= ush_single_sample(struct iio_poll_func *pf) > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1578 { > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1579 struct iio_dev *= indio_dev =3D pf->indio_dev; > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1580 struct adis16475= *st =3D iio_priv(indio_dev); > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1581 struct adis *adi= s =3D &st->adis; > 8f6bc87d67c030 Ramona Bolboaca 2023-08-08 1582 int ret, bit, buff_of= fset =3D 0, i =3D 0; > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1583 __be16 *buffer; > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1584 u16 crc; > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1585 bool valid; > 7f174ee4adeb12 Ramona Gradinariu 2024-05-27 1586 u8 crc_offset =3D 9; > 7f174ee4adeb12 Ramona Gradinariu 2024-05-27 1587 u16 burst_size =3D AD= IS16475_BURST_MAX_DATA; > 7f174ee4adeb12 Ramona Gradinariu 2024-05-27 1588 u16 start_idx =3D (st= ->info->flags & ADIS16475_HAS_TIMESTAMP32) ? 2 : 0; > 7f174ee4adeb12 Ramona Gradinariu 2024-05-27 1589 =20 > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1590 /* offset until = the first element after gyro and accel */ > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1591 const u8 offset = =3D st->burst32 ? 13 : 7; > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1592 =20 > 7f174ee4adeb12 Ramona Gradinariu 2024-05-27 1593 if (st->burst32) { > 7f174ee4adeb12 Ramona Gradinariu 2024-05-27 1594 crc_offset =3D (st->= info->flags & ADIS16475_HAS_TIMESTAMP32) ? 16 : 15; > 7f174ee4adeb12 Ramona Gradinariu 2024-05-27 1595 burst_size =3D adis-= >data->burst_max_len; > 7f174ee4adeb12 Ramona Gradinariu 2024-05-27 1596 } > 7f174ee4adeb12 Ramona Gradinariu 2024-05-27 1597 =20 > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1598 ret =3D spi_sync= (adis->spi, &adis->msg); > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1599 if (ret) > 7f174ee4adeb12 Ramona Gradinariu 2024-05-27 1600 return ret; > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1601 =20 > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1602 buffer =3D adis-= >buffer; > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1603 =20 > 7f174ee4adeb12 Ramona Gradinariu 2024-05-27 1604 crc =3D be16_to_cpu(b= uffer[crc_offset]); > 7f174ee4adeb12 Ramona Gradinariu 2024-05-27 1605 valid =3D adis16475_v= alidate_crc(adis->buffer, crc, burst_size, start_idx); > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1606 if (!valid) { > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1607 dev_err(&adis->= spi->dev, "Invalid crc\n"); > 7f174ee4adeb12 Ramona Gradinariu 2024-05-27 @1608 return ret; > ^^^^^^^^^^ > return -EINVAL I've gone with this as the fix whilst applying the patch Thanks, Jonathan >=20 > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1609 } > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1610 =20 > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1611 for_each_set_bit= (bit, indio_dev->active_scan_mask, > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1612 indio_dev->ma= sklength) { > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1613 /* > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1614 * When burst m= ode is used, system flags is the first data > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1615 * channel in t= he sequence, but the scan index is 7. > fff7352bf7a3ce Nuno S=C3=A1 2020-04-13 1616 */ >=20