Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2955797pxb; Tue, 13 Apr 2021 14:43:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlT+K7XKJmNvsPSJRroCrAjhrr36R1gLkikeZjrkPjmXJNV1CHaBAMfnuYNNPCow2OloXC X-Received: by 2002:a17:906:9407:: with SMTP id q7mr11871983ejx.434.1618350215201; Tue, 13 Apr 2021 14:43:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618350215; cv=none; d=google.com; s=arc-20160816; b=ciHGq4tiAfgb0yPOT2RU/KGlRK7H5KWuS839orGlbMEFw3Jl+2cn4kXoxRiYjoE3t+ iqZ3/aRlEMDmo6nV0eNZZHe0N6B88v/1BGHzevEVrm6BpUxw2Zwmr0ifw1Z+HBcLREoQ iKAdL11jj23YiEy/wpR5NLwmCpD9bDX9C1qKZRwEVRFirbbr4WEzp7VGO5+ZuaBr7Yw7 W4bj6ZbT9Zo+QzbK3S9K2Rn5wpiCp7nLAkhGjRn5hWocA/eBAzgFpYMcGd4VtKLdJ0q2 bQhYAgiShV75PO7p+RF2ojysGsTxPkafZUkqRwPDYACxZdB41QgY8AGEFWVLc3VwEkla yZ5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :dkim-signature; bh=l/gtMIE5aDSizPojDSpaMRMi6Yn99u3auh6+rCvsUmc=; b=j1LlkIA5C9BYRt1GJvL4vcS+lQii5XkTvl/CBFU8woiIdjPE56JrYc0Rh9/UklpZjc asOpGlBKENXvp+PRrzXxwA9C4SvpIdkKAAlkYdYC919ZH3nP7QlNWNnhkk7oROiwTiLs mlZzsiZdmft8BAxW2XuTZIn+g8YZJfdfaktrJdGxa0gTaBy8y/zqk8gE08yMeAiemKWc TyMnum0aoTRn5xr/1fMC9V8ejMw6ENswJQAg0PcBjtWR0HosYziJGB7FKOxy0HLGuFTw ntdz7yCew1UxkX8tdHLTSIX2maF88NZpX5alYHzHc1XPSf5LzSSwG+8QEuQZj5IIREq+ QDsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OQyGyidP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h18si4748001ejl.750.2021.04.13.14.43.12; Tue, 13 Apr 2021 14:43:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OQyGyidP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346000AbhDMQh3 (ORCPT + 99 others); Tue, 13 Apr 2021 12:37:29 -0400 Received: from mail-oi1-f178.google.com ([209.85.167.178]:38776 "EHLO mail-oi1-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346297AbhDMQhZ (ORCPT ); Tue, 13 Apr 2021 12:37:25 -0400 Received: by mail-oi1-f178.google.com with SMTP id b3so2813980oie.5; Tue, 13 Apr 2021 09:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=l/gtMIE5aDSizPojDSpaMRMi6Yn99u3auh6+rCvsUmc=; b=OQyGyidP9XO8oP6P2lynOf0eY8j9Gx3tfzmCHBADsEdo9oG8oVNrxjfZdpqQhTKtB3 dLvwUm5+iQ4iiP1uTw8oIKNmc4w2bcFIP+OLOZ9+vkZOtO5mcIE/uJ7aN6CqGFswC7OX oVsVuGbZKqEbHl6ODSkBsQmLbJ2Mc6xp+jjK3O7TchlyBCI2Dl0w4tfHi+XBuVQs5M1w uaNPsyXBqrPChSdYYif+7+ZCJ5e+vn7bEnOmDxZSUjAYQBaGHI62QOSHlEx5+nLxEAGy Bh0F62n8fAZizP6loiaGcUCt/WXho83XXHZi4QbhTxy+vS3QOCqegpPbWa1BhlWbfWnM VvwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=l/gtMIE5aDSizPojDSpaMRMi6Yn99u3auh6+rCvsUmc=; b=lt5dOeQ4V1L02jSXYnzP3XMRQB4GYCzp7ipfS9IokUMFdw5DCayelz85kxLr9C3fvP CLJ+khpOL7DMnqJZU0tj1CcReJSoK4hvXGQgQIzNuWRViySJodj+AeOX+l3F0cRzpJAk 0pMV/FUiL/N+aU+9aMsRhkyA55Dg3Q2S02//36ej4ZBgKzbsz/fG1A8IY8tBgXmtSbFK Y6LY6hhffwC6s04V11JfyprUp5Iz/kvYVTQZ0cslylhRjA3lk5zCl/A+QLM5JTZ6+R0F 2mxhuU8PSOcLnEloXzE9pMRk90bk+A/H+0zU5G7C0SKqgkHqF9d+7TrVjysy45Z/oGFB we4Q== X-Gm-Message-State: AOAM5315gFvNSbHE0e2w8/AVQtDLeWRskRV4GJ/ogb9bh/8PBGVay4d3 V4+/WbrYXvf/ZrP5jaggbQVtAc2b8+U= X-Received: by 2002:a05:6808:f8c:: with SMTP id o12mr563254oiw.137.1618331762234; Tue, 13 Apr 2021 09:36:02 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id j26sm232604ooe.32.2021.04.13.09.36.00 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Apr 2021 09:36:01 -0700 (PDT) Sender: Guenter Roeck Date: Tue, 13 Apr 2021 09:35:59 -0700 From: Guenter Roeck To: Jiapeng Chong Cc: jdelvare@suse.com, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] hwmon: (nct6683) remove useless function Message-ID: <20210413163559.GA91705@roeck-us.net> References: <1618293770-55307-1-git-send-email-jiapeng.chong@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1618293770-55307-1-git-send-email-jiapeng.chong@linux.alibaba.com> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 13, 2021 at 02:02:50PM +0800, Jiapeng Chong wrote: > Fix the following clang warning: > > drivers/hwmon/nct6683.c:491:19: warning: unused function 'in_to_reg' > [-Wunused-function]. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong Applied. Thanks, Guenter > --- > drivers/hwmon/nct6683.c | 11 ----------- > 1 file changed, 11 deletions(-) > > diff --git a/drivers/hwmon/nct6683.c b/drivers/hwmon/nct6683.c > index a23047a..b886cf0 100644 > --- a/drivers/hwmon/nct6683.c > +++ b/drivers/hwmon/nct6683.c > @@ -488,17 +488,6 @@ static inline long in_from_reg(u16 reg, u8 src) > return reg * scale; > } > > -static inline u16 in_to_reg(u32 val, u8 src) > -{ > - int scale = 16; > - > - if (src == MON_SRC_VCC || src == MON_SRC_VSB || src == MON_SRC_AVSB || > - src == MON_SRC_VBAT) > - scale <<= 1; > - > - return clamp_val(DIV_ROUND_CLOSEST(val, scale), 0, 127); > -} > - > static u16 nct6683_read(struct nct6683_data *data, u16 reg) > { > int res;