Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4450822ybi; Mon, 3 Jun 2019 11:04:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxigrHgodLNPj+IzExerNqYGNTre8vSioIWqfgHXlKlnqy7gattOLZjehF9I+9xERq4swxB X-Received: by 2002:aa7:8dc3:: with SMTP id j3mr33863209pfr.141.1559585052840; Mon, 03 Jun 2019 11:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559585052; cv=none; d=google.com; s=arc-20160816; b=xAEVoGMJ9sLK82tZO59APkZ7YDnsoRI+J8K3+uzEVR9A1XrkxXE8MnSqu/YKJ5N+JH OQkygi7ivrqdx5479qT1vBj5RA4ruzSRcaPoF4a1vlpf4lXqlVHjyXfbZsW/pzK/PR2x wi/IITNcfdwEVoQQ8EwZ40nTNNV2myGeZ59mdpUNlWVQT5MUTulqdnPnKdkp6b9sIl9q VVsMKfK1eNdndJgPICQerbrb9V1igIIp6I1UHlU2oXFZqEuTYj23egJVU35V0Fo0YVG9 nNuqGBdLO6UI8DfmWMSu+Y8koeMWzluNZbFbMBQOet0Z+SI4/bY3wvH9iaMcl7a6LUUn oLKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=Cj1pZf07kvlENKL26X7D+cHUVDMdH8wozQSB8Ue83tc=; b=bSrTTapaTuGTYN/8IQEPq4CO/MT6RRCZiwVD5Xq6clh/8WQa/RfiuvRFaS9gL+zgKi Om4YCGNOu2owUEt0xbuxPwht/0041g5JWQbOjFca/McOw9WxoI2yBtZxkQS+ZOt7UQ7o OLuByI/hEuCLvsaU/N3cf1cxZ2GEdHQQbK1ViUjWC5ZyHuOBmBoR+oQm3CnW0Ou9NYiL itj7/nfXk3sSHvneBb0bT6z4nsCSkEW2RojtvHbToa9SVtBZRja/57zcKTeJJVJ48ceo rA3u23TC3sS2IhUWzwzDEfv4NNOSnssF8YRXs6fH6hc/AsIX6xL8GxNdsh0eSpl7UGRH t1YA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c123si21311998pfg.35.2019.06.03.11.03.56; Mon, 03 Jun 2019 11:04:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726559AbfFCSAf convert rfc822-to-8bit (ORCPT + 99 others); Mon, 3 Jun 2019 14:00:35 -0400 Received: from mga05.intel.com ([192.55.52.43]:31358 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726211AbfFCSAf (ORCPT ); Mon, 3 Jun 2019 14:00:35 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jun 2019 11:00:34 -0700 X-ExtLoop1: 1 Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 03 Jun 2019 11:00:34 -0700 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 3 Jun 2019 11:00:34 -0700 Received: from hasmsx114.ger.corp.intel.com (10.184.198.65) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 3 Jun 2019 11:00:33 -0700 Received: from hasmsx108.ger.corp.intel.com ([169.254.9.66]) by HASMSX114.ger.corp.intel.com ([169.254.14.203]) with mapi id 14.03.0415.000; Mon, 3 Jun 2019 21:00:31 +0300 From: "Winkler, Tomas" To: Suzuki K Poulose , "linux-kernel@vger.kernel.org" CC: "gregkh@linuxfoundation.org" , "rafael@kernel.org" , Arnd Bergmann Subject: RE: [RFC PATCH 36/57] drivers: mei: Use class_find_device_by_devt match helper Thread-Topic: [RFC PATCH 36/57] drivers: mei: Use class_find_device_by_devt match helper Thread-Index: AQHVGiRM/z8BqVnv+kKKGRNhs5xXkaaKN3cQ Date: Mon, 3 Jun 2019 18:00:30 +0000 Message-ID: <5B8DA87D05A7694D9FA63FD143655C1B9DC23236@hasmsx108.ger.corp.intel.com> References: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> <1559577023-558-37-git-send-email-suzuki.poulose@arm.com> In-Reply-To: <1559577023-558-37-git-send-email-suzuki.poulose@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.184.70.11] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Suzuki K Poulose [mailto:suzuki.poulose@arm.com] > Sent: Monday, June 03, 2019 18:50 > To: linux-kernel@vger.kernel.org > Cc: gregkh@linuxfoundation.org; rafael@kernel.org; suzuki.poulose@arm.com; > Winkler, Tomas ; Arnd Bergmann > > Subject: [RFC PATCH 36/57] drivers: mei: Use class_find_device_by_devt match > helper > > Switch to the generic helper class_find_device_by_devt. Looks okay, but you could add me at least to cover later mail, there is very little context. Thanks Tomas > > Cc: Tomas Winkler > Cc: Arnd Bergmann > Cc: Greg Kroah-Hartman > Signed-off-by: Suzuki K Poulose > --- > drivers/misc/mei/main.c | 9 +-------- > 1 file changed, 1 insertion(+), 8 deletions(-) > > diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index > ad02097..243b481 100644 > --- a/drivers/misc/mei/main.c > +++ b/drivers/misc/mei/main.c > @@ -858,13 +858,6 @@ static ssize_t dev_state_show(struct device *device, } > static DEVICE_ATTR_RO(dev_state); > > -static int match_devt(struct device *dev, const void *data) -{ > - const dev_t *devt = data; > - > - return dev->devt == *devt; > -} > - > /** > * dev_set_devstate: set to new device state and notify sysfs file. > * > @@ -880,7 +873,7 @@ void mei_set_devstate(struct mei_device *dev, enum > mei_dev_state state) > > dev->dev_state = state; > > - clsdev = class_find_device(mei_class, NULL, &dev->cdev.dev, > match_devt); > + clsdev = class_find_device_by_devt(mei_class, NULL, dev->cdev.dev); > if (clsdev) { > sysfs_notify(&clsdev->kobj, NULL, "dev_state"); > put_device(clsdev); > -- > 2.7.4