Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp471944lqe; Sat, 6 Apr 2024 08:39:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmXY7Ssd8irfvr7WLzIaBncMf/Wh5iIKod7iHFbyQxxq4CFVEeOnxrbZYoOplW62qinh9GVgARf7yVJl/11+iGEtpJUR1gBuByXghQ9A== X-Google-Smtp-Source: AGHT+IGopZgm3dTiDUR2RCUEjhyzDSINdAfKRTUDnRcXioGX8BT41/RurPkL3YnlVI5qeCrbx/EG X-Received: by 2002:a17:902:e0c4:b0:1e2:adce:9139 with SMTP id e4-20020a170902e0c400b001e2adce9139mr3916352pla.44.1712417996230; Sat, 06 Apr 2024 08:39:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712417996; cv=pass; d=google.com; s=arc-20160816; b=BIbh12CE9s9Bm0DUA66KsXy66wAeH3RuCbb1jrm2wRGeHXA0danyaw0xc3pJVM4BYz JKi/NOi2f83wg3ujH2buD6F0xkk/J6uB2inOHz2Nx0Z1ZvyJmbXlpi2DfltakmcYpaR0 CzoGZo8Nn8k6WMwh8K7My7Sw7j3dW/gXv2NY74pPkyZAb+1NGUZXbLgCT9tXMaY0b02O tdgurwiwnvdeVYe3ou7clnGQK/Ux/F1hjXFj1wtO7GAXq53ITXD5KHrOoVKvD9Vsct50 8f0eEAHTTBEh8fI7EGsKzCFb8CcdjAJ9tXIaa8yuKOqcGvZr8ZbezgXgoh6BlSjImogG nU+w== 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=q3U6xmykW8PUrnQIQ/8HdxH+43/EV2VS+UN9XiAKr0w=; fh=NDhCO66HgLTwAblqmWCPzS+a3DPlFhxPS9JzLOrHr+g=; b=ExGoPl3cxEIF+qIX5iSfxnMSZzxy3y1vvJBGKaFUuHgeQPOanywdG9j3MHMuvtd4Fb ltT8PmyIQ438lENzleRKoF0UxKkMuLy/LPyb+yJHAro/QmB3mtFIIGc4kyBeZI2to/GM UraveY/Qg1EV2LS02k7HMIzxuQhcogijVaqUMIezGL5oDmCWQZDbRLZ9EcTtshZUsuI+ HifEfY/ZMrWHo6ZNqsbT8+LY3YSD4Tk5yGJThgA5nLxJwZEcIAzT9sJj7ah6dfuqdt9F +4K/r7QqWdna7dr3KioIGEDreNe9Jw5nTYGYC1Anzqb913rcpE+Csg0VrC13+7zeod7W dHcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qtR9QAY1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133980-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133980-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id t19-20020a170902d29300b001e25e248710si3182416plc.399.2024.04.06.08.39.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Apr 2024 08:39:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133980-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qtR9QAY1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133980-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133980-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E023FB218F9 for ; Sat, 6 Apr 2024 15:39:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C420D3A1D7; Sat, 6 Apr 2024 15:39:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qtR9QAY1" 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 EADF826AC2; Sat, 6 Apr 2024 15:39:41 +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=1712417982; cv=none; b=XfUBBaSsjO9qKw1n0up24Z6i+D7mwD2MZZ+iub732DnETokdiLV5kGeEVMdmmn9buKtbBJp9rR2X+EPsI3Pvu6Wtu1NpwnYMp+gbO1wfFewFjgFuE748f9zVc5uT0D/KTZTMtTOM/y1M/tmjTitANf03MttPg9CI21PucpL01mg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712417982; c=relaxed/simple; bh=ZS1O5rlPBLfEcou8rXXarcrf4dxatgQV4muJCx/cFFc=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ref69XZjIYYbHqfqpC1nwLn0NZcp+DOe0WRvJQHgSsyEUIFED4gTpEd5JeNJha8VA1RqK2xEu5pkDxHwTtwHU7tZPfhXnnYL9QO4QJbgoR0VqUWFpSKdlTibiyD8ydmixlSD4/rZkYe8Y3Oz0saIuFGTM2/OkugISghHSk7g0pk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qtR9QAY1; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AC1BC433F1; Sat, 6 Apr 2024 15:39:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712417981; bh=ZS1O5rlPBLfEcou8rXXarcrf4dxatgQV4muJCx/cFFc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qtR9QAY1JXq6fhIlfvdEkVE/7MG3waliLEaScKgd5DOMhCU8VLLPqN1qToUl5k27g QRRGLU441wYKZR80Avbi0cDAno3NarLeXbRoyPTRHrx1FGn6JmmkV/AJ6aHsxiQdCC 4ZnsiLnDu0x+fcGTIrGN/lmUMmOUi8vpKQfsLaM0vF36j2GVfFyV1jlTK6xKXZMwqC 5tlS5FuRUV2+bnKNpHfn8iWyREwnCCKLGEvdkn+e++O8ta4TMYwG9t0FozlUgGzLT5 SOQ20FKCllzrkGpkbrnItlsY6VNXUcZpo/ezjf8rUY4Y2G4r/T2k7rCr5GmCOf+QvI YyfSp7NaJSztg== Date: Sat, 6 Apr 2024 16:39:28 +0100 From: Jonathan Cameron To: Ramona Gradinariu Cc: , , Subject: Re: [PATCH 1/1] iio:imu: adis16475: Fix sync mode setting Message-ID: <20240406163928.1ea36f04@jic23-huawei> In-Reply-To: <20240403111357.1074511-2-ramona.gradinariu@analog.com> References: <20240403111357.1074511-1-ramona.gradinariu@analog.com> <20240403111357.1074511-2-ramona.gradinariu@analog.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; 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=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 3 Apr 2024 14:13:57 +0300 Ramona Gradinariu wrote: > Fix sync mode setting by applying the necessary shift bits. > > Fixes: fff7352bf7a3 ("iio: imu: Add support for adis16475") > Signed-off-by: Ramona Gradinariu > --- > drivers/iio/imu/adis16475.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c > index 01f55cc902fa..bd30c3469d9a 100644 > --- a/drivers/iio/imu/adis16475.c > +++ b/drivers/iio/imu/adis16475.c > @@ -1351,7 +1351,8 @@ static int adis16475_config_sync_mode(struct adis16475 *st) > * in chip_info. > */ > ret = __adis_update_bits(&st->adis, ADIS16475_REG_MSG_CTRL, > - ADIS16475_SYNC_MODE_MASK, sync->sync_mode); > + ADIS16475_SYNC_MODE_MASK, > + ADIS16475_SYNC_MODE(sync->sync_mode)); As per the build bots, this is triggering a check on the size the last variable. See definition of adis_update_bits() There is even a comment in there to 'beware' of what you hit here. Easiest is probably to force that with (u16)ADIS16475_SYNC_MODE(sync->sync_mode)); or a local variable. > if (ret) > return ret; >