Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp603552rdb; Mon, 29 Jan 2024 11:57:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IGrgU2gB/C7DUMS+8mK64dxqTerToRI3mWMDCuQ7QkINna9evfaBkTE+kuF25Bd8eXChu8W X-Received: by 2002:ae9:f403:0:b0:783:f77b:6dc9 with SMTP id y3-20020ae9f403000000b00783f77b6dc9mr4151504qkl.18.1706558273739; Mon, 29 Jan 2024 11:57:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706558273; cv=pass; d=google.com; s=arc-20160816; b=KsqjUeNdws5XCYsJQsLPMnAwooIiwSwnxiPqa3jk9wh99pOlDConttv1IKJgbVqkIB WpVD8bqOU4fqFsfjL8vvgYNUUm9ERLLlxDqK36/lwHa3zUX8t03BCCrzEB49aQS1g4R8 NMqt5yFZiWVQvb9da+2/n7LhfGEpCa66D19iXj6GqxTIOuPduUyZc89gyJTmMvrLILU6 NdDiH4ecx5EW6UgWYHy/3Wb6gVl6jqmNPdlX1eg1PTpkKABIlgrIfu6q/HM/caz3x8sB C/yhZh0pzU52foe6Jq7LqWdGhXMhCNyvhJytmREsF2t2fwLcXXVNw2Ts4YxpPNN6SXty YPKQ== 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=i5JH9Myv9q/YceQqu54f5uK3uimdtGRsRM4S57PMLa0=; fh=csa3KEMTUTfTNGW2D8uMCA7NLz9lSlmGU6PUt/EwOLQ=; b=g8JpUvd+DQl9PEz+yGeHwSuABSYmLBXDvjJr+JReA3rlIKTUYaquX9s501VsNNp7RY BxSGYzALGfaB96dBFYexPT4oSw/hjk9SIL5ON9nn8eyJJolujXTAzQNGnCJOcftnTGn7 ijHdSL4Zwa6UK+trRlg21rcZt/ZJJqKSZegfByno9a7eXyhfQulE8R+78vR8KnDuazLx QFuMPBhzSi/LSnTbc/Fh1FUcZKmI3wXdtLAA9NW387nMhi2qsy1FeXvXM80uIFXyFy6q LnjhyXjja+RPz4NREtw3kgIcW3yfQMWkDwxTseCbQ81M/1+ktMWlT9d0jgf9GAD4ii5X eW8g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=ukC9dun5; 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-43444-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43444-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 bj31-20020a05620a191f00b007831e54431asi9204837qkb.69.2024.01.29.11.57.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 11:57:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43444-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=ukC9dun5; 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-43444-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43444-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 7FAD31C2360D for ; Mon, 29 Jan 2024 19:57:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DBF9F157E6E; Mon, 29 Jan 2024 19:56:19 +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="ukC9dun5" Received: from mail-oa1-f54.google.com (mail-oa1-f54.google.com [209.85.160.54]) (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 58F7676022 for ; Mon, 29 Jan 2024 19:56:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706558179; cv=none; b=SvLOXorRhSPv47UPBUWxxK0MutCdu7/yvK02kvUoImJIzfhTgd+tDV+Y9bdzrhYIzf+FPF4WF5EGcQ7BGF7xJLTWOmij395BnKz248iXAKlsXFbNdGfkajLS+ahDHF8Q0/RN6G7v8UNkxh7js2hpR5XH9j3JJM2Cqj3FvzbSr2A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706558179; c=relaxed/simple; bh=DyCOayE1NQTevHqWf5WsQyEq5fQg+GhRZMLesWeEPWU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=luQFinz5ahIjf4VkjFV+56LSZuiPGo0dD8P6ohshjEzuJHcxgMNaq3+uk6mFnUyl+d5QJ1jEpFoDCqcwTyVk5gV1/949cr54VltTasnlGtp28o8EAZPtfhAFMYE4H76OUfQWVCmIKBwLW5UsRSb9U6qrBr+Yc7u5z2DVWtQ/ShQ= 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=ukC9dun5; arc=none smtp.client-ip=209.85.160.54 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-oa1-f54.google.com with SMTP id 586e51a60fabf-21428d99395so1834843fac.1 for ; Mon, 29 Jan 2024 11:56:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1706558176; x=1707162976; 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=i5JH9Myv9q/YceQqu54f5uK3uimdtGRsRM4S57PMLa0=; b=ukC9dun5AzyEdhqG6DI+/CsqaNa+3ej4pH0epVuFO/6LUsvvuuePVLKpYk0HoQP/8k RIZ9UHVr7fKkYtg4WEBvkjBc3/DtY49OmpoY2zhDX+caC4ky2aG/bfiYMz3UrmOYm+sj MFdrOLOVEUngmRf4ZQJfwdzZgaimb2bkidNTwUpzhuYQ96Z4pVG+JDSXca2Rh412Eg7y OT9dDIEarggRs4hoTxo5uuP44sv2/svWElgd3wamOh0gQeTlM3zBtU/d6pX7dGc5TNSf XgeGcO4eUXhEb52+gBp6uAQ/OQ6+AAJPdrykrBzrVOXBFvlsxJ1SarOOQ+Hlcx95ykVA wgqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706558176; x=1707162976; 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=i5JH9Myv9q/YceQqu54f5uK3uimdtGRsRM4S57PMLa0=; b=MyExFjfjmhJbwhMatL1oz9w1gejwz50dAg7MEMIFa7hcaU867ShJ6yylnT5lJMkvSL ZixHogiftbc78SrtNEcxVAsX/5GoP/60ZPyScpDdmw2E61bAzPnQpjihPYyOrdu8WkHr udqLACkePWyjAtdGofXD0Y73E4fDTTH055CpPWgsElbEa2Sz5GPi2Ok1KlfujR9NJogO Fw+4Orc1Ua/UAZ38HQRh3W8wT7/puWlzBl90/NYWselp5uZGnMlQFsrA5g7obqSAyt10 9TBDmHtvtgY0GqSG4IS9M72XwzNlIuwutgGqsoPY+Lr7y2Q3l/G/FRJec1X1rAkuGoxz 0l/Q== X-Gm-Message-State: AOJu0YzwezPQUJS3+Bsw59DPsHndKpsWh3Jqoi4enRi67KpDf5H4pTKh Ye36oSp/ks7CVKF4hunKa5L3PGIpm2gtWDPlCO4GPaJqGTUxPCiHKCzs+4a9qIY= X-Received: by 2002:a05:6870:a40e:b0:218:4a68:eea9 with SMTP id m14-20020a056870a40e00b002184a68eea9mr2226546oal.12.1706558176544; Mon, 29 Jan 2024 11:56:16 -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 r11-20020a056830134b00b006e129d7b833sm641292otq.39.2024.01.29.11.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 11:56:16 -0800 (PST) From: David Lechner To: Jonathan Cameron Cc: David Lechner , Michael Hennerich , =?UTF-8?q?Nuno=20S=C3=A1?= , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot Subject: [PATCH v2 2/2] iio: adc: ad7380: don't use bool in FIELD_PREP Date: Mon, 29 Jan 2024 13:56:08 -0600 Message-ID: <20240129195611.701611-3-dlechner@baylibre.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240129195611.701611-1-dlechner@baylibre.com> References: <20240129195611.701611-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 --- v2 changes: * use correct terinary operator syntax (had typo of : instead of ?) 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..abd746aef868 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