From patchwork Fri Mar 26 14:34:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 12166827 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C448C433E1 for ; Fri, 26 Mar 2021 14:36:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EF35B61A27 for ; Fri, 26 Mar 2021 14:36:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230163AbhCZOfr (ORCPT ); Fri, 26 Mar 2021 10:35:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230327AbhCZOfY (ORCPT ); Fri, 26 Mar 2021 10:35:24 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BE77C0613B1 for ; Fri, 26 Mar 2021 07:35:23 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id v11so5847255wro.7 for ; Fri, 26 Mar 2021 07:35:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3OURK0/BtiRmYmxdr9eDjqtjV+BCQ8RHntM2yCP2zSg=; b=PtT7cwy7Kq+1bup/YFbEJarCVzHxuEVc84amtcMt2h+VpFZrtcrInuDnq6EqibA2Fd fj68TSdpiKv4NbeM2Uww/Bs+rUREHG1Ec0QSCmFZdLwd/BrgKiKUI61ekI12IC8wH6la uNBN7ibIy1PNF2z9mutas7vHVc6k/3Xe9IbpSZaIi4YeGFe9WL5soXxTfHc3gvbrFhVm zAjvp5E8L1Dr79OibPl0dfASqXLujV2VUIBhSL268DEwj1FvBNG2DRuLL+w3jstQznTr ScQzsT5V3hDnqeV4Ac7uuKMutmm9q5NiAbXe/ozjwXZ5prQy6O7QC8hBbLGTeDGMefxK fo6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3OURK0/BtiRmYmxdr9eDjqtjV+BCQ8RHntM2yCP2zSg=; b=HFF6LOjxshDokVlLsqh/Xg9uRdV+fy/oKJBGMpzyoH377soA/fa+GfQtpqGGtgfvsa /u48QR+vF7cly8rMZ91UGnic5rRq3IyMP3xhsLJNcPOW8CI2h60hBso9kC5+iZO6Mfyk syJr0x5N7deXKZkHckg1qOXj4y9zuAVtSTCHF45qJWiUAn4eVzKr+2xZHfdeGgD2OlzH 49VXGAR7CqWGItL1abxkItMdt1VC5k+Z0Kiu0bO6x7PWLRUVpWEP1e4gTTSPmqa07b6G eNtwB8S/IkJU5fpmek1v+UE0Efp2jv8LHuALGx6a33ykZ+Xpl0WzvgTxyQ1e0OBZQ7Qn bGkg== X-Gm-Message-State: AOAM531muvtWwsgSqiX3cIrN4tNnVMnKdO4X65HyQxdXY4ARgTV85mPv ogDrl47WWDQnhg69Ymv/PZGPbA== X-Google-Smtp-Source: ABdhPJyx2thqrRk6seohVbZh5o5G2l8H68FVAIdYkEEG0m4XDCj/sno1gMcTDejHXnqfiBiYzqMxXQ== X-Received: by 2002:adf:dfc3:: with SMTP id q3mr15131963wrn.121.1616769322202; Fri, 26 Mar 2021 07:35:22 -0700 (PDT) Received: from dell.default ([91.110.221.194]) by smtp.gmail.com with ESMTPSA id j26sm12878225wrh.57.2021.03.26.07.35.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 07:35:21 -0700 (PDT) From: Lee Jones To: lee.jones@linaro.org Cc: linux-kernel@vger.kernel.org, Jiri Kosina , Jonathan Cameron , Srinivas Pandruvada , Benjamin Tissoires , linux-input@vger.kernel.org, linux-iio@vger.kernel.org Subject: [PATCH 20/25] HID: hid-sensor-custom: Remove unused variable 'ret' Date: Fri, 26 Mar 2021 14:34:53 +0000 Message-Id: <20210326143458.508959-22-lee.jones@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210326143458.508959-1-lee.jones@linaro.org> References: <20210326143458.508959-1-lee.jones@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Fixes the following W=1 kernel build warning(s): drivers/hid/hid-sensor-custom.c: In function ‘store_value’: drivers/hid/hid-sensor-custom.c:400:7: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Jiri Kosina Cc: Jonathan Cameron Cc: Srinivas Pandruvada Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Cc: linux-iio@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Jonathan Cameron --- drivers/hid/hid-sensor-custom.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-sensor-custom.c index 2628bc53ed809..2e6662173a79c 100644 --- a/drivers/hid/hid-sensor-custom.c +++ b/drivers/hid/hid-sensor-custom.c @@ -397,15 +397,14 @@ static ssize_t store_value(struct device *dev, struct device_attribute *attr, if (!strncmp(name, "value", strlen("value"))) { u32 report_id; - int ret; if (kstrtoint(buf, 0, &value) != 0) return -EINVAL; report_id = sensor_inst->fields[field_index].attribute. report_id; - ret = sensor_hub_set_feature(sensor_inst->hsdev, report_id, - index, sizeof(value), &value); + sensor_hub_set_feature(sensor_inst->hsdev, report_id, + index, sizeof(value), &value); } else return -EINVAL; From patchwork Fri Mar 26 14:34:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 12166829 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53FAEC433E5 for ; Fri, 26 Mar 2021 14:36:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24A4361A21 for ; Fri, 26 Mar 2021 14:36:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230231AbhCZOfr (ORCPT ); Fri, 26 Mar 2021 10:35:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229871AbhCZOf0 (ORCPT ); Fri, 26 Mar 2021 10:35:26 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCF1EC0613AA for ; Fri, 26 Mar 2021 07:35:25 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id b9so5845926wrt.8 for ; Fri, 26 Mar 2021 07:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YMBBfLBQyPfcs/BjCQH23mCoZ18SMLXlxq4s4Yi+O24=; b=SzlRTOBcfb8HruNCzxQ/XXDAxq8fqES6yINPpKxgv4YKBPLmmbqmuPhwiUVO/O/bUW P1w/L8olV5BC+2GhwMbfJzWKf+I0byxOzDmxedHXQRpbaUn7kLwJTP3EYVK9rUnFTuOX LSPAQMbX/Q5Z9jQhWhH72x2cn7ShB3260TwJY25LbnCBInnTAVHXAYq5MrO24MNb+/nk 3JFUCg6Dz1iHWIaWHwysjygdZsVzZpilI2K649/2LGwPBWT6xLAlqMoZIUed5yLxFyr3 Md0ubvCnN3awJtJHYKf5OU0rJagj7ePess/DcrJvayL0t57GgwR5I2DPAW5/L1/rCSIY 4Xxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YMBBfLBQyPfcs/BjCQH23mCoZ18SMLXlxq4s4Yi+O24=; b=ivrELGa4sjml+xe33jbB6pjVX2/lhmtMoKrQ8jsB2zsJLmTl7dUId3u3KRO0zX7Ryg dIN/Y9Qst5IRWAhJK292ACOpKpc6rQM/yt2jxwKWPEjtEXwK+/oFgO53DvRWXhQcnJj6 zf1mkjCBnPJzbWEjw3P0x884mCHjY8U/BAz7b1/lYVQ8cfIEX4m8+nGB6LVjopUvx/sE tNfdyTm5TntlHHr2Fp1L0TmEiODz8973KPWNAjOjdJIFzJ9vuXuH6sk7f1WRkYiLgZ/w GOM19AZ9vNcLcrRy7t3hSGNnFN8bNAyud2nzrU5VQbdF9vd83BrovXInO+1dEAat+RfW 6W3A== X-Gm-Message-State: AOAM5322CDZdEPe53TDf7/yjqWCuwAtkb5jFsiM/zIQp6T/RJuDwyKFJ JM+NunDK4bSc/Tt+KIMo6JG4AQ== X-Google-Smtp-Source: ABdhPJxVEQw3OXVcUWupqGocVo9kUby54BTdwkPyGcKLXqoHGoInXFiNk3GDV8kL7UYSFgCKfKInWQ== X-Received: by 2002:a5d:6092:: with SMTP id w18mr14807891wrt.52.1616769324690; Fri, 26 Mar 2021 07:35:24 -0700 (PDT) Received: from dell.default ([91.110.221.194]) by smtp.gmail.com with ESMTPSA id j26sm12878225wrh.57.2021.03.26.07.35.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 07:35:24 -0700 (PDT) From: Lee Jones To: lee.jones@linaro.org Cc: linux-kernel@vger.kernel.org, Jiri Kosina , Jonathan Cameron , Srinivas Pandruvada , Benjamin Tissoires , linux-input@vger.kernel.org, linux-iio@vger.kernel.org Subject: [PATCH 22/25] HID: hid-sensor-hub: Remove unused struct member 'quirks' Date: Fri, 26 Mar 2021 14:34:55 +0000 Message-Id: <20210326143458.508959-24-lee.jones@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210326143458.508959-1-lee.jones@linaro.org> References: <20210326143458.508959-1-lee.jones@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Commit b0f847e16c1ea ("HID: hid-sensor-hub: Force logical minimum to 1 for power and report state") removed the last used quirk handled by this driver. Fixes the following W=1 kernel build warning(s): drivers/hid/hid-sensor-hub.c:39: warning: Function parameter or member 'quirks' not described in 'sensor_hub_data' Cc: Jiri Kosina Cc: Jonathan Cameron Cc: Srinivas Pandruvada Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Cc: linux-iio@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Jonathan Cameron --- drivers/hid/hid-sensor-hub.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index 3dd7d32467378..36b6852f75dd5 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c @@ -34,7 +34,6 @@ struct sensor_hub_data { spinlock_t dyn_callback_lock; struct mfd_cell *hid_sensor_hub_client_devs; int hid_sensor_client_cnt; - unsigned long quirks; int ref_cnt; }; @@ -615,7 +614,6 @@ static int sensor_hub_probe(struct hid_device *hdev, } hid_set_drvdata(hdev, sd); - sd->quirks = id->driver_data; spin_lock_init(&sd->lock); spin_lock_init(&sd->dyn_callback_lock); From patchwork Fri Mar 26 14:34:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 12166831 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F021C433E8 for ; Fri, 26 Mar 2021 14:36:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8CC0D61A2A for ; Fri, 26 Mar 2021 14:36:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229871AbhCZOft (ORCPT ); Fri, 26 Mar 2021 10:35:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230374AbhCZOf1 (ORCPT ); Fri, 26 Mar 2021 10:35:27 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28647C0613B5 for ; Fri, 26 Mar 2021 07:35:27 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id x7so5843392wrw.10 for ; Fri, 26 Mar 2021 07:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cQiBvBGnEPCfXvDLlcXYmYRETtwubP2zncCLn7n+qro=; b=I00rzJ2Pb7xw7qyx/Ux/iw5avL4Qa+ePqFm2O47i8SPa2MwvByhdllikoreR5RZPq5 gmf29+BchuESCtjhbW500HI1pMhjDYSqXRz0zpDsl0VWtvfTtm+yyvYEQLZq7ygzrLax uhk3PwjegUKYtD9HfqGHoLz2N1l+lBtd/82MXC7T39KAink0dpxWK8q0V+o75Bz6ijTg VQELl51GdcI6SVg266nyjrsOigDblcjUYU/UG48jNjSZGpYeMgUzogjETeYNI8OXS9ws bzBYIx32n/T5T2bFM/Cb5T+T45cBCLIOP22bxe37CEx/vLAW5+ETfsOQhYNDt5YYlW+o duEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cQiBvBGnEPCfXvDLlcXYmYRETtwubP2zncCLn7n+qro=; b=oW9xrHUNxP7qUSsA72U1Bw/3o1/cgPukdNzp4ABgy311r7vAEwlKG1xyMNNol6r6OP zLxB3tuaZJZ72M3eMGC/1fkvMoD6NYvP3SGNrLUDtCIct1/gNLp660EXz2e3fIRkCkZs gvlGFmVVvP9wzkbUtES89ER7/+0YreS0P6Vr9kCAe946tOZFTf+E8BTZTlYYWWGhMwez N6NRqm+LhuGmnk4s/CCurue8GtnyCDGwDIiyFX6JTPsMSC/k4y8N4sOTKSwoUe+wgQvS 1TlLpQBksuNCg44lghGejAHM9BcQdwPjJY5e3jp2QTdaJn5HmlTeTXWg7NIiIb0FMPnq lEtw== X-Gm-Message-State: AOAM533taG6PKWiIdwkgozJJtSvvKaWIk/OIMFS4MVPRCE1c50zjJkAV 7B5ZTm022OvzwRO2Y25k4Ui9Fg== X-Google-Smtp-Source: ABdhPJxVQH9E7yz/g9mCKCmuf6kL2CneZmZwGC42RiuDWq3ME4fXeUoxutDqT538V/wUc8tO54qLtA== X-Received: by 2002:adf:e34f:: with SMTP id n15mr14838333wrj.224.1616769325875; Fri, 26 Mar 2021 07:35:25 -0700 (PDT) Received: from dell.default ([91.110.221.194]) by smtp.gmail.com with ESMTPSA id j26sm12878225wrh.57.2021.03.26.07.35.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 07:35:25 -0700 (PDT) From: Lee Jones To: lee.jones@linaro.org Cc: linux-kernel@vger.kernel.org, Jiri Kosina , Jonathan Cameron , Srinivas Pandruvada , Benjamin Tissoires , linux-input@vger.kernel.org, linux-iio@vger.kernel.org Subject: [PATCH 23/25] HID: hid-sensor-hub: Move 'hsdev' description to correct struct definition Date: Fri, 26 Mar 2021 14:34:56 +0000 Message-Id: <20210326143458.508959-25-lee.jones@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210326143458.508959-1-lee.jones@linaro.org> References: <20210326143458.508959-1-lee.jones@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Fixes the following W=1 kernel build warning(s): drivers/hid/hid-sensor-hub.c:54: warning: Function parameter or member 'hsdev' not described in 'hid_sensor_hub_callbacks_list' Cc: Jiri Kosina Cc: Jonathan Cameron Cc: Srinivas Pandruvada Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Cc: linux-iio@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Jonathan Cameron --- drivers/hid/hid-sensor-hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index 36b6852f75dd5..95cf88f3bafb9 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c @@ -18,7 +18,6 @@ /** * struct sensor_hub_data - Hold a instance data for a HID hub device - * @hsdev: Stored hid instance for current hub device. * @mutex: Mutex to serialize synchronous request. * @lock: Spin lock to protect pending request structure. * @dyn_callback_list: Holds callback function @@ -41,6 +40,7 @@ struct sensor_hub_data { * struct hid_sensor_hub_callbacks_list - Stores callback list * @list: list head. * @usage_id: usage id for a physical device. + * @hsdev: Stored hid instance for current hub device. * @usage_callback: Stores registered callback functions. * @priv: Private data for a physical device. */