Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5728766rwr; Mon, 24 Apr 2023 08:11:54 -0700 (PDT) X-Google-Smtp-Source: AKy350b3AfS73fj+W3qj8Kh0ZBkXNl+gSHgrXuaEvOax9xEH5unpj8gVKd2bueAxnMg9yGNGDDY8 X-Received: by 2002:a05:6a20:8422:b0:f2:994a:ce5c with SMTP id c34-20020a056a20842200b000f2994ace5cmr14536257pzd.35.1682349114006; Mon, 24 Apr 2023 08:11:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682349113; cv=none; d=google.com; s=arc-20160816; b=sqeidXj/Dbic+7DFbCXNWeZz1DGAjAO7E5cbwFvdOtNZUke8cnZ+TPtYfGiCSA2ILA 2JFoemVvyi4T3gnwjFJ7a+zeM8MOrdZTSP/n+AP/n/bPwa/gRcTKKLY2l+0yenDM7oyG Z80RYpyNT4i0HYoDdO/NqaKNMcW7s0MHV7CnpbgLMQPiivCDxmGDFod4PLBTAndJzCzs NHOIZ/vQEETb6e5N559ghg4uGuyaq9aDWGQ0j4SgfLp97EJxgrQSdm5cvEc8pq0s4Kok mXaP13KyYEESzKRuLVHevQq1xPItLCg0Vj/f1tcQhLcaROZm8WZqnf0qYueWa42BIUG3 5lwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TyC3Am9x5MDVCnozv7oRC741HUNVYU534Al0Yoe0eTc=; b=BFWSnChikyF+Fk2k5ldELG8gEKDQX0ScEnzht3mA8yVDjfH1E+sbkYR694/Mj3P0fY tEA1w+5dZuW/6GaB6obJNy9hfJZ7Fo2lPVsQC2jH6OzACbIat3PfCm7aTG4BTxdaf+nP kdYz0Xqut98gmidShJVE+2sQqiT7TAiFzfwwXrbjucBRLydrBaydqjJe8W9K/D8oyenh SVXUKVbw19rrpUyK8Noh027tMw+kQrHt+FJ2N1qu3Xyj4EQgaP/BIaEdhL5wWmtYIaLq H5n466Cvd+3C+BiN1lwkC1/ojDJfa0l8seXsOwdxwtMSLQevIGiU6/kwcYVthp5d0QMe YhSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=IIPTUf5I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n184-20020a6327c1000000b0051b8ab9b2a7si11621359pgn.193.2023.04.24.08.11.29; Mon, 24 Apr 2023 08:11:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=IIPTUf5I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231713AbjDXO5E (ORCPT + 99 others); Mon, 24 Apr 2023 10:57:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231293AbjDXO5A (ORCPT ); Mon, 24 Apr 2023 10:57:00 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A55ED30E5; Mon, 24 Apr 2023 07:56:59 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-504eac2f0b2so7833984a12.3; Mon, 24 Apr 2023 07:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682348218; x=1684940218; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=TyC3Am9x5MDVCnozv7oRC741HUNVYU534Al0Yoe0eTc=; b=IIPTUf5IBUBU+Edya4d4mMv5fiLcs2rvu6zqLp9FGrq7ekNjKOLsialN5g5YCi7iaW GnBXBGOXMXv9ltzpNUfXrp1uII7kbw/K79oIQHHvv8swu5gQRo7ZtbIt658QY1doi6iH AzWU2/3ltjC/lZgMN+KplAU2Kg+IMos8XGzfNx2oNyacC+orYuJ24VXEa+U+T3KAiVp0 inkAZyS1niNOmGKFY1ccfqDu8ALNIrGx9Ba6lK0QrlBF6WUm5pQP1vu791nGg7WONFgI bK0lpYgaE9Va73Pn7JfQcjGjjuCtAn9LgCBXpQAy0pk+/GnK6/JDSKtDAll17IX1lgQG eO6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682348218; x=1684940218; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TyC3Am9x5MDVCnozv7oRC741HUNVYU534Al0Yoe0eTc=; b=ioLbKia7b4sL1QI5qbu0pTQvb0vgBjpn7vgRhGXjJp5feCYK0DXLNaGd45y/GURMzj ZcDCvPED6qSplmr21wAIRN+/MlyHJjeCtuS7A9LBTpQd9giW7BB7j5/a1MsomFrFXpQk Ws6vHq2nPoYIFLxfbeOXR/0xT40wnPYPu12YLCNuG+Zm+BvX7eNae6JzS6LcQchp1EdL OcNhw2e8FWHvEjvTzv84eBzytw5iqbHhxKmNRIMW/V5dzQG55RUyUuO9WR88XNEQnqK0 na/J8knkXYjmcd/z7O3mABcUgMdphH49aVk3L9sVjZKtVdke+tSiTVd+IKrjFs/xVx+f aRxQ== X-Gm-Message-State: AAQBX9eqU0tZ/jr8Kzs1kjLwChCGgujXlvodBVnNZcz2CYLSwAK1aCp7 55YtBO2l8q6fLn5N5ZOahh4= X-Received: by 2002:aa7:c902:0:b0:506:c20c:6de8 with SMTP id b2-20020aa7c902000000b00506c20c6de8mr11983389edt.17.1682348218038; Mon, 24 Apr 2023 07:56:58 -0700 (PDT) Received: from carbian ([2a02:8109:aa3f:ead8::5908]) by smtp.gmail.com with ESMTPSA id p19-20020a05640210d300b005067d089aafsm4698705edu.11.2023.04.24.07.56.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 07:56:57 -0700 (PDT) Date: Mon, 24 Apr 2023 16:56:55 +0200 From: Mehdi Djait To: Andy Shevchenko Cc: kernel test robot , jic23@kernel.org, mazziesaccount@gmail.com, oe-kbuild-all@lists.linux.dev, krzysztof.kozlowski+dt@linaro.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v2 5/5] iio: accel: Add support for Kionix/ROHM KX132-1211 accelerometer Message-ID: References: <202304220729.FCofPRvH-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello again, On Sun, Apr 23, 2023 at 10:57:00PM +0200, Mehdi Djait wrote: > Hello Andy, > > thank you for the review. > > On Sat, Apr 22, 2023 at 07:09:12PM +0300, Andy Shevchenko wrote: > > On Sat, Apr 22, 2023 at 07:19:44AM +0800, kernel test robot wrote: > > > Hi Mehdi, > > > > > > kernel test robot noticed the following build warnings: > > > > I believe it's not just a warning, it's a full functional error in the code. > > > > > 686 { > > > 687 struct device *dev = regmap_get_device(data->regmap); > > > 688 __le16 buf_status; > > > 689 int ret, fifo_bytes; > > > 690 > > > 691 ret = regmap_bulk_read(data->regmap, data->chip_info->buf_status1, > > > 692 &buf_status, sizeof(buf_status)); > > > 693 if (ret) { > > > 694 dev_err(dev, "Error reading buffer status\n"); > > > 695 return ret; > > > 696 } > > > 697 > > > > 698 buf_status &= data->chip_info->buf_smp_lvl_mask; > > > 699 fifo_bytes = le16_to_cpu(buf_status); > > > > You need to mask in the same endianess space, i.o.w. either on CPU or device side. > > > > I believe you wanted to have fifo_bytes to be masked, but I'm not sure. > > I wanted to read the registers buf_status_1 and buf_status_2 --> 16 bits > and mask the result of the read to get the bits 0..9 which is the > buf_status: the number of bytes in the buffer > > This is due to my lack of experience, but I have a question: > If I don't get any warnings when testing, how should I go about this ? I > will obviously fix this, but this is for the future. just ignore this question. I installed sparse and I am using it now when building. -- Kind Regards Mehdi Djait