Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp472511pxy; Wed, 5 May 2021 06:44:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+Z8ok2DAFZvJeRzaT5rXQ37s5YcHqvUsTfDgPVemqvvrjRWXIM9jnQCa/7bcTb0bdtudS X-Received: by 2002:a17:902:9898:b029:ee:d673:198f with SMTP id s24-20020a1709029898b02900eed673198fmr16633883plp.19.1620222276971; Wed, 05 May 2021 06:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620222276; cv=none; d=google.com; s=arc-20160816; b=MSRChUsv6ho3ETSxwQTEbja1EKVD+NNs7LAFUR/9RwYNvCV4AETarMQ6Ewz0iWjCrO gt1o53/oUMq4OBJtq/Y5zXNnC3wgP5MEHc/itUrSpXl/ncpYpSsBFKkqoLbXmm/h4jTr W7Idht8KtvvZVTZdF52rJoZnU5Qmw4Gow/6iNyqcIj5E4aMno2+LgluNQrq+qfueOZeh Js/JB7geafA4+Shl2XsBWS8a9q/cH6ii35lmRgPffgAp+nhlpeCLR5C/GCNN5jRBb577 FDTx6f9KAHQclGGrag8xU5ykURtV5eNcN8J5YT+YgfsR+rIIIn6gcVHTrfUAD4YQuRAq ngUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=MUmZrpGT6OxCV5nAhpibrhOp+RbEkcdwQ+thqkA6VLU=; b=Qwgg3VIf8ysyQRIhLA2QdZFAxRqxCmUTN+aLZtti6HR0GzSvSiwELbAKnxml3bGDNb II0WvOWU/Yjf4R0MbxsYIyVKkCVbxzNEFpcCPzFvlakXFXGXjryquTQEA/YmG5ZMwq4c t/hw93DtYzB9P3sRvkPrhT9wewVu+USBkrXvZ/XcrzUsH5ODaAvHv3oGor7afXfc4kPQ g/hCijBWQTtvpTgSY0qeGvXjW7P+e1oQGr4YOFVR2q00V8g7MkrmkcGMmZmqOKpTKVXC vBQ9909JMuuiG6PueLVf7pxKtY5fYM6d9a9fN+6taoVS2W5KxaprE2wWBiYMns4YeKlV f0Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D3LCYFRM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 4si7681667pla.393.2021.05.05.06.44.23; Wed, 05 May 2021 06:44:36 -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=@redhat.com header.s=mimecast20190719 header.b=D3LCYFRM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233545AbhEEN3P (ORCPT + 99 others); Wed, 5 May 2021 09:29:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50735 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233661AbhEEN3N (ORCPT ); Wed, 5 May 2021 09:29:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620221296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MUmZrpGT6OxCV5nAhpibrhOp+RbEkcdwQ+thqkA6VLU=; b=D3LCYFRMTEplVQxx+uodTHoPWhiMv7N8WDaDSOHeOiSbTlMw9rNw2kuRopxraynYQOHanJ DWWDroXJuxUUYzYymc4Gj4MTeQGDUT8M+qTfx6e4Coh/gHAlz2i4CXSxJsaskLAoIuRRs7 rz6YfqM5vGKctayBHyqk/Fi1jxdJxak= Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-426-N46OA7JnPeyrNYUAOQMD_g-1; Wed, 05 May 2021 09:28:15 -0400 X-MC-Unique: N46OA7JnPeyrNYUAOQMD_g-1 Received: by mail-pj1-f69.google.com with SMTP id u13-20020a17090a3fcdb0290155c6507e67so865643pjm.6 for ; Wed, 05 May 2021 06:28:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MUmZrpGT6OxCV5nAhpibrhOp+RbEkcdwQ+thqkA6VLU=; b=C9OKcuMcsM1wqG/A4pXzF6/HonQ9NflFecSSESadP4y2kbl05z7RJY5Zdlu44Nrgms o6/VcqYUyHjt+/0bfmoJGUND0umHhw+vkujiieqsWFuI0RJoKD5ELcGQdZl43fR15SHU ILbXF5ik/02a3Mfdkp+GovqfZLWefAQYZs5Jfqso6RmFslhT9Ev5aT103469NkIOogX1 bNgz0pSlHMltFzPiKKToSYEw1nvNhufuj69K/mH6D/cjhGipveDt9HWc0B1uvZg6SFXP a3aT5qY0PX1jXOFuWmro/5lCcjW0BUPHIWHvUI5tuTKMKvKxwy/sqQP6e62QXlsGxTjm 8eHw== X-Gm-Message-State: AOAM530oB/98JVb1cnwErGB9vIlFnkHUI4z6fcMKySoQI2r3CLJRyQgL Na4mBL8DKWKDL261NWnNhihw5PZuKEIAdA2BqhmiNwGFZWpJnK4DVZgnpXTOacp+ErbjUZwviRs RrJPYDb29cFG2wRLO7GN1tOCtMcmvW0w4f1zAMWCd X-Received: by 2002:a62:bd13:0:b029:25c:5ec4:c2f3 with SMTP id a19-20020a62bd130000b029025c5ec4c2f3mr28257270pff.35.1620221294312; Wed, 05 May 2021 06:28:14 -0700 (PDT) X-Received: by 2002:a62:bd13:0:b029:25c:5ec4:c2f3 with SMTP id a19-20020a62bd130000b029025c5ec4c2f3mr28257243pff.35.1620221294078; Wed, 05 May 2021 06:28:14 -0700 (PDT) MIME-Version: 1.0 References: <20210415185232.2617398-1-srinivas.pandruvada@linux.intel.com> <20210415185232.2617398-2-srinivas.pandruvada@linux.intel.com> In-Reply-To: From: Benjamin Tissoires Date: Wed, 5 May 2021 15:28:03 +0200 Message-ID: Subject: Re: [PATCH 2/2] HID: hid-sensor-custom: Process failure of sensor_hub_set_feature() To: Jiri Kosina Cc: Srinivas Pandruvada , Jonathan Cameron , jiapeng.chong@linux.alibaba.com, "open list:HID CORE LAYER" , linux-iio , lkml , Abaci Robot Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 5, 2021 at 2:38 PM Jiri Kosina wrote: > > On Thu, 15 Apr 2021, Srinivas Pandruvada wrote: > > > When user modifies a custom feature value and sensor_hub_set_feature() > > fails, return error. > > > > Reported-by: Abaci Robot > > Signed-off-by: Srinivas Pandruvada > > --- > > Replaces patch: HID: hid-sensor-custom: remove useless variable > > by Jiapeng Chong > > > > drivers/hid/hid-sensor-custom.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-sensor-custom.c > > index 2628bc53ed80..58b54b127cdf 100644 > > --- a/drivers/hid/hid-sensor-custom.c > > +++ b/drivers/hid/hid-sensor-custom.c > > @@ -406,6 +406,8 @@ static ssize_t store_value(struct device *dev, struct device_attribute *attr, > > report_id; > > ret = sensor_hub_set_feature(sensor_inst->hsdev, report_id, > > index, sizeof(value), &value); > > + if (ret) > > + return ret; > > What tree is this patch against? In my tree, we're not even assigning > sensor_hub_set_feature() return value to anything. > I guess there was a "collision". At roughly the same time I merged https://patchwork.kernel.org/project/linux-input/list/?series=456269 people were starting to send various patches for the same thing. Srinivas, either the change in for-next (and probably Linus' master now) is fine, or could you rebase on top of hid.git? Cheers, Benjamin