Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp593439rdb; Mon, 29 Jan 2024 11:32:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZcSKd6CL5S4XiD5i28jioycXxXhUfXi7XtPWJ1wKULd50BiFa5igM35h6VfCrFD7LHYXi X-Received: by 2002:a05:6122:5a1:b0:4bd:5787:82cb with SMTP id w1-20020a05612205a100b004bd578782cbmr1662780vko.18.1706556726564; Mon, 29 Jan 2024 11:32:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706556726; cv=pass; d=google.com; s=arc-20160816; b=VDEWqtLo4+b64EfyXXw1OeIMWOkFgSoBzodH1O+UoUuytn2LtmPjOtY8EmkenWmFhN B9ZBHFXOmQlTlS8Dl++Gi8G4rAZnaMpwKfBW4KvzKfnlZGvQFJyo6hg/K2ncy6HcrEij USCdcde80x1olrFML39NOJ05rFhCIZdOVSwfobFiQzyIkxV+LGjVAuJGyXCNNxOZR91b S/Bh2IvEUEFZhMI76HBjWW9sVjbmowacTN1BLEIJnhjcwPeyuXV8zS19biNoERP/zW+Q K0F8K4DZ8nTS346i81eB9gq3f0OgJsnfXpE8vZeXUTk0RXHYI67Toy+3q2rJ21y/whR7 SAwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=CQ9m1/F9S8yFHzEc2XLsfrTvCTLg95PwiYcPzfrZs1Y=; fh=IgTnd9ay2fGbSu83DKq8/WxUtpOyC/gILDlqSxKEjo8=; b=MOM9dZiuRUWZ+Cm5EyDRNMzjt8vdTVGgizIZ83AZVPmiGHpQfkOJmBPdsA6bgI3TVa CfUZdqyRBgXRli2Q0NhX4yQqb4mKyjugcPorfJXDewqb9bgjDAwiZyo7i5dHPfA/Lqir D/cbzjY0oyih1AfbT0boOFxMZG61VIx4QQxYgNY2F/4n8fPzXFP9yPL0ZaVwXyR2RMOe oVK+5mZsdZran2BvZz4/VtM2q6J4A2kq8QMBs4/HWZA6dc9/HYHt2zCA3c6NdjHjl+8H 8WXlPRDPHEgtejzjVuVXuaoII9hOQtBkUOPwSjc+6RHnO+eCm8pgIvwbRL5qwJcvXvKG dj+g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=hwuprVcp; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-43412-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43412-linux.lists.archive=gmail.com@vger.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 8-20020a0562140cc800b0068c5d1038cesi329873qvx.453.2024.01.29.11.32.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 11:32:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43412-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=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=hwuprVcp; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-43412-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43412-linux.lists.archive=gmail.com@vger.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 510F31C244CD for ; Mon, 29 Jan 2024 19:32:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 035204CB24; Mon, 29 Jan 2024 19:32:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="hwuprVcp" Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B6F448790 for ; Mon, 29 Jan 2024 19:31:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556719; cv=none; b=WbtRX1nnWV5oMHD+XvVYMz4FPAzNiqms8iNbva6hCM1j5XqK4yFk/KXsBGxNa0odgNLGA4JyFu7hVjbbCVviAw0ix3pplNzTvTsWT1+UZk5lRqnluJOwB+jB3+r0j3uJj3Oi5c90NRrOSLhoLRzs8B+xesJ49WX5bjWA/s/BPeQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706556719; c=relaxed/simple; bh=IsB9JY/4AyjDEDK/QCSn5bRVf6sdMPgHiV31yELbmAo=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Xi8/1wHp02h3/QA/fQqc5NbFYsgUAPXAOfx5jut+OWE5wKwgrOGlDtBoX4Q39PDpC8rqLScdfK5pbpFI1pL6kkeHXqaq5FdasMC14FGz5k5LmlkNOM798RpRQ1t2Kbd3aqD3pSuT758shaZ7uFAtIaU3josEcNmF8TWqdKSCNFM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=hwuprVcp; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2cf3ed3b917so35137821fa.1 for ; Mon, 29 Jan 2024 11:31:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1706556714; x=1707161514; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CQ9m1/F9S8yFHzEc2XLsfrTvCTLg95PwiYcPzfrZs1Y=; b=hwuprVcpL9KbL5FWEvgOzJ4WtD49Z2mB3cqO+9mVuZVtjlzyWzQQMgnSwvyXNUPdnI EIJn3awvfliePFHZFa8+Xk3vhQbmX+FmhyCnctkOg5ussmt9xBIo9LZ6ROpckJHrs9eM Gb1gLALA99MuyXxCf8a3S7upXv8CI10nwm7tXr9eFEWpcgHMzaEC3CJbx5IV0ucLQ+Qh /SSqdqK4a6AerB3xDbQw5KsTfPDzsAYj68fXmFONqrquhj3WU3lCzikZrJ4E5bEnMeAd Z38FBzsCGcznkbDIbX1uy7hMmoaW8xsvHzU139vedKXagsSc2l89Tmle/U/9FMoUlx+c l/yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706556714; x=1707161514; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CQ9m1/F9S8yFHzEc2XLsfrTvCTLg95PwiYcPzfrZs1Y=; b=htmQyFciiqM/yXnJ3Ku3uLflaLj3cuF164yHtmmcGwK+khuDkRtfGvIiDs6o18oiwC KN23I+lvB3eUMZVgzXlnfZlF6pSzH+wFG15a8voaOuUNMuQAcMOFD/sG8qKRvO4wpV4w o8T55CAnQ18W/lqYHd4F84uzkKpHyGqRzQnX0OZ+gjXqvQWcsbdMIPceFIZqd6lKQlcu 0T2G48WlguF7OsxGSdrs3F7l+nziOLKX3kfuP59DitxopDiAosWGbSri6FF22dz+25js /RC9S1m+fEdyo0nTYcYYnkEy5PwN8xdKSzMah5Co72ZKWnyvbmmb7PPcpRxG8zM31Kyn iogA== X-Gm-Message-State: AOJu0YwPt6p4eccONK5GXUJFIGsDRlR1ELUIlgtJjrdeBiq9kD/DfvP6 g5CER4nQrcegk65xwY97iUZZ07ERMX5kCOo4JZ+ARQCotb4sjN7UFtUeJln37sYiQ4heQvA303f G3ZUBhh9/znZrQHKTplaKTk5LDQGWAcdG51sqCzdG65d+gIXz X-Received: by 2002:a2e:a99e:0:b0:2cd:fafe:1893 with SMTP id x30-20020a2ea99e000000b002cdfafe1893mr5696137ljq.4.1706556709852; Mon, 29 Jan 2024 11:31:49 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240129174150.655088-1-dlechner@baylibre.com> <20240129174150.655088-3-dlechner@baylibre.com> In-Reply-To: <20240129174150.655088-3-dlechner@baylibre.com> From: David Lechner Date: Mon, 29 Jan 2024 13:31:38 -0600 Message-ID: Subject: Re: [PATCH 2/2] iio: adc: ad7380: don't use bool in FIELD_PREP To: Jonathan Cameron Cc: Michael Hennerich , =?UTF-8?B?TnVubyBTw6E=?= , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jan 29, 2024 at 11:43=E2=80=AFAM David Lechner wrote: > > Although this technically works, it is better to avoid using bool as > a bit value. > > Fixes sparse warning: > > drivers/iio/adc/ad7380.c:353:34: sparse: sparse: dubious: x & !y > > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202401280629.5kknB57C-lkp@i= ntel.com/ > Signed-off-by: David Lechner > --- > drivers/iio/adc/ad7380.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/ad7380.c b/drivers/iio/adc/ad7380.c > index 44b8b18ab213..a4aa0db47720 100644 > --- a/drivers/iio/adc/ad7380.c > +++ b/drivers/iio/adc/ad7380.c > @@ -350,7 +350,8 @@ static int ad7380_init(struct ad7380_state *st) > /* select internal or external reference voltage */ > ret =3D regmap_update_bits(st->regmap, AD7380_REG_ADDR_CONFIG1, > AD7380_CONFIG1_REFSEL, > - FIELD_PREP(AD7380_CONFIG1_REFSEL, !!st->= vref)); > + FIELD_PREP(AD7380_CONFIG1_REFSEL, > + st->vref : 1 : 0)); Somehow managed to introduce a typo between testing and sending. :-( Will send a v2 with the fix. > if (ret < 0) > return ret; > > -- > 2.43.0 >