Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp539867rdb; Mon, 29 Jan 2024 09:45:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbomd14nUnWbnId8Gvp3RmMrCGiDfC5hdj4vwY2aUlyzGCK2wfDvP/vwO/JPeXDsE1BCOU X-Received: by 2002:a17:906:b47:b0:a29:852c:dd21 with SMTP id v7-20020a1709060b4700b00a29852cdd21mr4867548ejg.10.1706550331414; Mon, 29 Jan 2024 09:45:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706550331; cv=pass; d=google.com; s=arc-20160816; b=FKDTiS6hNf/hpBcR8rvpgsjBghSYYTe2V0E2nwDjRaypIIPJYVUMVnv58lhkuGYzbY xEnvfteRYD/mFvKDyHNdDMvMB9w5mTg7/dAl8LBLHkiiHdILSjB/ZvmteOwMbLqhEWpx GXPDxamF+WzTHIeZznDqViabTPzK96Ofg2rQsE0DcEh4xcimWk6nlG3IpOM/v5FLGPTH /TelMAFTGqtAXVCn+nulP2mzACmMA0SyGcu0UPKJ9LA51jR4bXliKAA5NWwJcrWQCzOK 40YLGmNicurgA73klyL5FKcGwE9UU67l/upnDmXEUDzbYzL18A9wsKVoJK5nsSKqnLwi M9hw== 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 :date:subject:cc:to:from:dkim-signature; bh=Cn/LQOeTBFx9zDrBTCXy4pCuw6SR0x8diD/cv0ohb+c=; fh=W3SwDLI6HvpntyvZ+2Zj8Wl84U9ZZ+IEslWClhK2Vlg=; b=UiWybF3DKq1NTSRbigbEINe+S098UcGaThk6BySYIwEoMdCVcvzP2bjhJqMVHtIrRT jV6V8gCHjkvEyh+i2Z0uzRWCEMjg6/maE43wlp3Zw4Rlpk+8nH5xRTR3XikaARrQivbZ dxLe3Fkni1Qbik2sgFYdto0c5VhaIx++tCoh0lCr61Gv4vjuo49xGXR4EP+2dVF0q3BE 6ZgXiS3AKaz1dhOxuYHfMwR54MSbTYA5bX+NknP96MFIiHewSDjcwHP0HF16xkjHDaVx bMjj8TwuMduDiY7X9yLa3lzj24xUW/ZbNhQWDGwiytzzyr75iAFi/lo7ka1CBDoU0ZRc ZBow== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=yy5o3rc5; 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-43222-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43222-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z10-20020a170906714a00b00a35a4569150si1425411ejj.994.2024.01.29.09.45.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 09:45:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43222-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=yy5o3rc5; 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-43222-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43222-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 291A61F232A8 for ; Mon, 29 Jan 2024 17:45:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A6E376031; Mon, 29 Jan 2024 17:43:49 +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="yy5o3rc5" Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) (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 10BE53F9C4 for ; Mon, 29 Jan 2024 17:43:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706550228; cv=none; b=EDkoqeH7nCTZx7SUGjMtFxdrjqWQP/k8ZCzQk79b11pjfKlWyinhyHx9EyTo/6z8Lda7cfLDBL3WUIqsgBQnAygDwngCBLgha4vPnfS2oAzdgvZqMLdQ2le1yZPPq/+mIyBFL5JLejuLMIRkSzrGqorRWDvIvwz25Ef4Qkaccjc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706550228; c=relaxed/simple; bh=ezxaAWnO3x5MlzXMVPde2b8Z5cmfO15kjRpRqQ8IuhY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ADXEbGuuuVjRCQphj7L1jO9Xnc1Y+jVXgXowQcAF18YuJ09/oD4R4M+aQEV1RfVmcG0gfUwdLyb6T936BWKM9Dfd7j8S5zbeHbc0ApeocT+y0eF5ApMKcwOgwBOjQyU8cITQ0tNTAaQjP9uVrG6jSbUVSVhGPfv81b1r0EUDxi0= 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=yy5o3rc5; arc=none smtp.client-ip=209.85.210.50 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-ot1-f50.google.com with SMTP id 46e09a7af769-6e117e0fee8so1167597a34.2 for ; Mon, 29 Jan 2024 09:43:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1706550225; x=1707155025; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Cn/LQOeTBFx9zDrBTCXy4pCuw6SR0x8diD/cv0ohb+c=; b=yy5o3rc537NVtCklv0xRS8QgfjO+CRRC/TVNtNz7NmB3dlVBWgKx44vqYRYlp3/N/g sxCiiIsX0Nel9fYWhfxEV3JqBrJOMYAcRCZtmKEXMSggpu0Dfm9SZUhcps+uhc9eZB95 Xj5VPBHkO0BzQQZ0eTIt6Thos54yH5I4KO5vZoZhdq9lTkmnCDxRVIpSgWvTW1Xv1494 taQ9xZ/9IZQlL12XZgApwYp2gE6IGqH5ZNQPAAb88BvwZWNzCsCw1AALHndUoP5It2bj IoV26enEx1V/+0SBRKv/bDK1Gj1VgGN5JY6fv8X0495z5j1565/l1cRNWwSmqFMNOP+i YrkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706550225; x=1707155025; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Cn/LQOeTBFx9zDrBTCXy4pCuw6SR0x8diD/cv0ohb+c=; b=OsV18HCoeApVom3FQjrW9fnpziWD25F4cIALaIKx2XG2MZcw8o3Csn6bthI43DOafP WcS56aEziqOD1NvpSRZwm5rz9WiJgwAEo6JMbnwLwX6OcL+Qzsl+br/qyOwh5cznJ0Q7 z5aZvhdlxaA+KBxqpEZjcihPIHMLya9EdssYWP+DTAkG8WqNZpiNEfb2GQrspcuCN9ms fWj6m4eNCoHw3Obj/b1Y0ug7uPdZ5gkCGzyunm8XCHa1qSyMENaVRS97SqOyqGBqkRG8 uLna8qqw6hNQX9wMc7Z/lPk6+vsj6otlrW6xuMuk9af67RMIX1yP4M97IdFLO8KpmhfB bAAQ== X-Gm-Message-State: AOJu0YwpADBXOxVG47POYus43Hukp2UNL52M37pfjh+wbguUkaXQDj/k +KfZtOY3z4GZY00MNpKIvTh3FHycpNLDkPPw06Ui6QykBTKPsr0ezRhFue7qfZI= X-Received: by 2002:a05:6830:2aaa:b0:6e1:377e:c421 with SMTP id s42-20020a0568302aaa00b006e1377ec421mr1355224otu.25.1706550225195; Mon, 29 Jan 2024 09:43:45 -0800 (PST) Received: from freyr.lechnology.com (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id p16-20020a9d6950000000b006e126e4b05esm661334oto.2.2024.01.29.09.43.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 09:43:44 -0800 (PST) From: David Lechner To: Jonathan Cameron Cc: Michael Hennerich , =?UTF-8?q?Nuno=20S=C3=A1?= , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, David Lechner , kernel test robot Subject: [PATCH 2/2] iio: adc: ad7380: don't use bool in FIELD_PREP Date: Mon, 29 Jan 2024 11:41:50 -0600 Message-ID: <20240129174150.655088-3-dlechner@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240129174150.655088-1-dlechner@baylibre.com> References: <20240129174150.655088-1-dlechner@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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@intel.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 = 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)); if (ret < 0) return ret; -- 2.43.0