Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4833293rwr; Sun, 23 Apr 2023 14:36:18 -0700 (PDT) X-Google-Smtp-Source: AKy350bDNEfpzonqkb+x+vGX8LZmJygHhdlYPAIZhMS8YotAwxgYNlH+ChI37dprzBycIHLkiZrx X-Received: by 2002:a05:6a20:72a5:b0:f2:9161:d4de with SMTP id o37-20020a056a2072a500b000f29161d4demr10397980pzk.49.1682285778592; Sun, 23 Apr 2023 14:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682285778; cv=none; d=google.com; s=arc-20160816; b=Lw7U04cmmR0Y3G2e+bqfI0GheiiV6IqkB+KbQBR1dB4/4rgHEv2I5GJnSadiTZ/kjc H/pvVCHwBbOfVQV0PSK6+tsDyIvOKPGpFurCAMCbzbAtEhppm9VEt1HhYFJFXxYi0OaO MqvC1k4kFLO3CQkr2KHSDP1wZrVg2BEwWb5E64gIu2Fnaip+umtdQhkyC9EdmhbRN3Hw fsdudxsMkKSFtsbKQOsvWdLT+0ZCLTFpyCAmGM7As94kAX6eNa56HFfi9WSpXOgx5l72 0Wxzo5du6QnCXtafiVemvm/OwFpZRC4SIFpHifIp5MTBHhIyWVp982NmHGEfn+KgpajU Gnzg== 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=eU1Tk/gnXrnHdm84vw9TLyvNW9CFqnp1t/CWjp9JRhA=; b=t8ApwlXGi05UJ2yVj0V/ULNVZDBYN2q2t2dA9e1V5eP6oWlodzXCy30Bd7C6b9fJy7 u8Da0TFE+lJKAF++J+pCbzblHvqGnBi/A8fK8UbbOUfu/7aV4gkqbfqndY2FxsBrJT6L nNe+iqaDJCJdps+PSP7aykb4WvYMXzN+f2h1P9ltN2QI+MOo2asN5a21VtHCc60amfqs YFpb2sFPakoNi83G6ZgX5XBuhHLZxN0/kTju0F+huy1Z4G6mLD0zMMLj5b5oQ4MiZ4cs dglASBxOOnMAWmvWYBBemBCWcMs9yWx6Flr7Rer/am5beMdevHunXex0f3ogoeTWbY7H OTLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=S0am4xMm; 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 j64-20020a638b43000000b0052132a8e4efsi10209638pge.326.2023.04.23.14.35.54; Sun, 23 Apr 2023 14:36:18 -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=S0am4xMm; 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 S229908AbjDWU5E (ORCPT + 99 others); Sun, 23 Apr 2023 16:57:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbjDWU5D (ORCPT ); Sun, 23 Apr 2023 16:57:03 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3063B1AB; Sun, 23 Apr 2023 13:57:02 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-9505214c47fso674038766b.1; Sun, 23 Apr 2023 13:57:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682283420; x=1684875420; 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=eU1Tk/gnXrnHdm84vw9TLyvNW9CFqnp1t/CWjp9JRhA=; b=S0am4xMmSjK8nfNHQPjGBaesjmnvMyXntZB/bvW3dK82NNjT9tYgsNWiDVA1sdYdzv js5tmbQz3O6QZyxcgwyuDb1QzZ8fjBcFHxDMhkGtKJv0CYeMmZvqzHFfa83qWDrQmgX7 ZdYyoTSRk/FE04DJ3yuZzXIQYYAhwmpMpD2WAkyc2hv9/pJaxVk+Wk7FnmnImwiYTEp5 rllaOUCBk2nsT0lcfagBN//TxWfudqKDpOoOJCSuhxoM+xH+JQA1710fwYttY/+vwU61 1QVXdPkI3ofYzrJHD93JkT8V0A6GIdwghe4ghT79rtNExmo8NIbI3y6atw/WQyNnKT6S iiTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682283420; x=1684875420; 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=eU1Tk/gnXrnHdm84vw9TLyvNW9CFqnp1t/CWjp9JRhA=; b=heeZXL9KD8t5sjHUQ9wiLigN1Hz/Yi0ZeJZt5NqtHrUK24D9asnzJp56J0l8ci3RZH 7wPXLjT4Wrfg37L1aei1U6xn6LzxLPFzFIyXejCFqKLC12lr1OX3U0wDO/1O8eE+rWQo XZfKVGYORs+Jrklrd7Q1bik8bBn9I31vFI4PT8XMWUD/bd+GiGda8TmcC+/3pIL0Uvgj gCqpKLSFJY3CJS9M4eQ+sj/c0bjIk0Ai3gkAWHZSAj0G5Oic+XNN3r8lGMlw+meHnTqx HHkAp4R/GFuPjkRJlB7ChApKuS7qJJBAYvZTBrGoMKxO4xVHtNMn4tUMkM0iXIBaN2ZM xB0A== X-Gm-Message-State: AAQBX9ccIGW+/bV1T5GgaYfLhMv31+3sEfrY0ZheeTlr4fBkwIxv4zwv OwV9lMd2xmsr5O0+LenVfkw= X-Received: by 2002:a17:906:4a8b:b0:94f:7d45:4312 with SMTP id x11-20020a1709064a8b00b0094f7d454312mr7253697eju.29.1682283420445; Sun, 23 Apr 2023 13:57:00 -0700 (PDT) Received: from carbian ([2a02:8109:aa3f:ead8::d7e8]) by smtp.gmail.com with ESMTPSA id li14-20020a170907198e00b009572db67bf2sm3208007ejc.89.2023.04.23.13.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 13:56:59 -0700 (PDT) Date: Sun, 23 Apr 2023 22:56:57 +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 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. -- Kind Regards Mehdi Djait