From patchwork Mon Jan 29 17:41:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 193617 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp727614dyb; Mon, 29 Jan 2024 09:45:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKAJOew4XWwzCqCRmCu3O6z3YaJUgli4d3fFQEsRKCp5YF2KWPAPzt+Yi0eN91SN1geDbu X-Received: by 2002:a05:6214:250d:b0:67f:820d:9bea with SMTP id gf13-20020a056214250d00b0067f820d9beamr7130425qvb.45.1706550337058; Mon, 29 Jan 2024 09:45:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706550337; cv=pass; d=google.com; s=arc-20160816; b=f2JQCMAm/KOzEq5hiINp6i2LJcfxG1lpXu0LVnTWKSErq+hLqv1tgm5ZoTqWcH2OY4 5KahgzuvxbKvk85LaKdohXaiXqCspzy9kVHjh/hpgFiKq7YJbqIWnmZ6ojHpjohDyiyA NR6Cs6Ao0wtECbv0D8SUNcFOu+fkTyINQ7rQa2HNj7mWeB0qQjj8pY8xq4os5Y+iU/47 duW2oheKdn7rvK3b9jiwW13O1Fj2FxN2L/m2ehGAVVfD2l2bZwwCaGJg5u0hYGPBmM55 JE3jFEWv3ukpOpBcq7pyIKEPkk/Ybjr6Wz+H8defkGtazpiFH7fETnvVQBYc3BexEVnU +6nA== 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=adx5Y3cgX71ZvwEi/qb8yz5ApFtROFIqpevhH+PdrQ4=; fh=W3SwDLI6HvpntyvZ+2Zj8Wl84U9ZZ+IEslWClhK2Vlg=; b=0bGBUc6qOMqLl2ETI7EUCmz/9qnYadvCdTt4d+Fwt7MsYBhHwT937JCy6FFWT+ymmR 3H7YPzga8G3xWzWLfP+FRfRQ1JGfIS3SI1+O4tFgdDb0GxMsWdt8xuNuuv07FHd90LQG nf7/LSU+O2lkGJf0yM1b1aSGNn4rvMNNCvYlUlkSNP7rDf0XyuWhFeEx7s+5CMwb2cP8 pPoVBM53Q5ywHDHLYwEF850sRStbbLSS7QQ5OfcciYFtXk/0Eh4Z56/Pt1YSuwpmKIuS 23aYKi2rFPxnpQAb7027HCHNQFBMnpQ5lOcgdOOFCAcHt2jtWACj9HtNVESkikBlgIyk shYA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=JLZwfpAP; 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-43220-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43220-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 3-20020a0562140dc300b0068c46099424si4170556qvt.608.2024.01.29.09.45.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 09:45:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43220-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=JLZwfpAP; 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-43220-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43220-ouuuleilei=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 D53901C2137A for ; Mon, 29 Jan 2024 17:45:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F09E076041; 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="JLZwfpAP" Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.48]) (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 5B4666F082 for ; Mon, 29 Jan 2024 17:43:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706550227; cv=none; b=eG3aIoC3Zpp5zMyBpUmrfSZc5R3iTdwJE515c+aid71Z9zpKJi3zwvXbgI8Ln8/4PoGyjBA4ATn50IDzuEbAqZcN/pj5r6DZEf0DJT5/ycO51DJkBmf2Kc0RUAwt4isF+u39zkDyww4ib4qqIs8MD3weCvifW9FbH818epuDPs8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706550227; c=relaxed/simple; bh=oZHqo1ucDWB9pyoSuojibAK6SA+XCVw1HAeO06tsAhI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Im5Pqq2u/onaF2TTfjJ7Pqq2T4+7KA0Xs3kouYxxtlVDje1nGNF4ra5qC3p/9TBnrpyJ1KS100XA6ATZHIpHqQk3Y8eSCBY8Kw4pcmehABFcbMLnKHTcgxMiKVlO7RPIssBCFogiQRLkcp/MNcCXaCe65JnTMhW2EkjnLr8woLA= 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=JLZwfpAP; arc=none smtp.client-ip=209.85.210.48 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-f48.google.com with SMTP id 46e09a7af769-6e125818649so906482a34.1 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=1706550224; x=1707155024; 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=adx5Y3cgX71ZvwEi/qb8yz5ApFtROFIqpevhH+PdrQ4=; b=JLZwfpAPFpLY2cpYnKaGArBrxow7WREvTPinscspsQOy6M7aK8Nlvcx5MuxVMHfMiv KunmJ4UQSj1Cy5GggXdCLthjHGmrCjaFj5pwBx4aJY4JCCBSStZo5JIJ3meyHvIU5V4n 9iyFWX+FL3eUe6L3VQrG/f3f5bERHVj0QpvkHbWihTSHMjPA9QWj1hYI6QWiw1S0AXsa eqiI+UYe6FMv5eYRuoQoY26qc/UH+inmpKWYLLa6G0ikGXm44K6+YMtnSDxdHwRlPe9A 1vlQw46ob0OfbjGhRsuNlvhjE70Ef1ziH/ol6ktda4GhXVrXH7R5Y0LzaHCTpI4020D9 H6CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706550224; x=1707155024; 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=adx5Y3cgX71ZvwEi/qb8yz5ApFtROFIqpevhH+PdrQ4=; b=vSUBrCzc3DRrpn0+xO4EQwhlJxt1ceUqAakcA20/XP7KjCnmp7OKbItHadAKf40ter yb7BKRdomlEy+24FExcbruziBFBqfJQH8//DM6rO+6kdOHGWVzlsTxgIyvRPi5wh0yHv XfY3ylgo6VDjN863I2Q79vSTVxW2zmIJFRO/LUJMrQkBzOJE8DNFUnlrxksP6RVqlIfF 46glGXlVwdAnTj5uxaUslLpo6JG/DP/b0Xwr7lUePyJu0eT5Byyqj9OZJOWzY2441xQJ zm8ggQR+2nw5YcjRYZFbhaVkQnzGN+tbVIqxgf6oeo17qthQIDUYmKWKr3zoWGpfxeDX xlIw== X-Gm-Message-State: AOJu0YyYY6Vo4zoNjSdwNMwgFraUqhUnKsz3IIyJ1FEvK1j6zjMyMeHT O0YZ5vNkRF8jY87RZq2hZssDh+sMZovdfaX7uheI+T0mA/AO/tL82lbMphT/knQ= X-Received: by 2002:a9d:665a:0:b0:6e1:5dd:72af with SMTP id q26-20020a9d665a000000b006e105dd72afmr6735710otm.17.1706550224537; Mon, 29 Jan 2024 09:43:44 -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.43 (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_S=C3=A1?= , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, David Lechner , kernel test robot Subject: [PATCH 1/2] iio: adc: ad7380: make ad7380_regmap_config static Date: Mon, 29 Jan 2024 11:41:49 -0600 Message-ID: <20240129174150.655088-2-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789447726700837977 X-GMAIL-MSGID: 1789447726700837977 ad7380_regmap_config is not used outside of ad7380.c, so make it static. Fixes sparse warning: drivers/iio/adc/ad7380.c:205:28: sparse: sparse: symbol 'ad7380_regmap_config' was not declared. Should it be static? 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad7380.c b/drivers/iio/adc/ad7380.c index 80712aaa9548..44b8b18ab213 100644 --- a/drivers/iio/adc/ad7380.c +++ b/drivers/iio/adc/ad7380.c @@ -202,7 +202,7 @@ static int ad7380_regmap_reg_read(void *context, unsigned int reg, return 0; } -const struct regmap_config ad7380_regmap_config = { +static const struct regmap_config ad7380_regmap_config = { .reg_bits = 3, .val_bits = 12, .reg_read = ad7380_regmap_reg_read, From patchwork Mon Jan 29 17:41:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 193618 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp727719dyb; Mon, 29 Jan 2024 09:45:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IF77wdDUFZheig2Qwo4caNsWBBMJLRGwYuXG0z8yCyAQiLqnw1t5eeicgeutDPzi49eKxeD X-Received: by 2002:ad4:5dc2:0:b0:685:bd10:75dc with SMTP id m2-20020ad45dc2000000b00685bd1075dcmr10142819qvh.0.1706550349309; Mon, 29 Jan 2024 09:45:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706550349; cv=pass; d=google.com; s=arc-20160816; b=0alqkYt2a8nI7AV89BoXQ/nJyvsylVj5WVN9bna/CfjuHf8ihHTJovvcqKxxax/SEu 3T9NiJ1cHGlPauVoTnjaX5DO9K43COW4bmT9JdIDZ3nPOP4/MeDxXSCHHk1+W/RceELI omVJc5JMxB9qK2CLu6y0k7UBGNEZKFEiQnhJ4OMxLw0VKxZLQUDEuBN0KVnKfWOt0eq7 mjLIbg+EmsGSBKVBUtl+i7dDfmEzcWECiwIckyjipwWWwo/g+ZZaibNuvfCpTqegl5tp D1FabRrRFsEc8lgRQ0NkiXgOFi3HEYL6fTS6K+4tNP8lHeFVf87+AMbuxQUZpWVN5K5V pFdw== 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43222-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c1-20020ad45ae1000000b0068c36c87e6bsi7701086qvh.472.2024.01.29.09.45.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 09:45:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43222-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43222-ouuuleilei=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 1E9BA1C231DA for ; Mon, 29 Jan 2024 17:45:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69C377605F; Mon, 29 Jan 2024 17:43:51 +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_S=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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789447738752428079 X-GMAIL-MSGID: 1789447738752428079 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;