Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7825774ybi; Thu, 6 Jun 2019 02:03:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyq4HDAb6mh65PVgFzA5KFiATBgRXGPJEEpVhS5nvwiXM6g0jSPKOqZpKwDlZrSBxcXo8O X-Received: by 2002:a17:90a:9b08:: with SMTP id f8mr7336728pjp.103.1559811793843; Thu, 06 Jun 2019 02:03:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559811793; cv=none; d=google.com; s=arc-20160816; b=af5lJULFf+szlHzA/uKno817roLm2rmAB6Hs3kISf1y3RbYJr/8J5B1ZRtnflA/CFv xfiMZnpAer8PeYqloUuldE+8o/Fp56ISsAvQo7fAyKSJPRWi1Uv1QZByRPta2UCeTsXR BwdEnjJUFVeXVLaO6kZLV0pXuS1ZTob47rEA5d8xkYMvhivgn6s1488scFYt9W2Tfe0l PhixYOVISaOl4zaSV8rFYyHoSpF1IzPJDbg+c4OTJr1qgIGJzgUdhzJ7xs7Avw5aMeLj hs/z2aykt83zHua5/TfhWuBr1vx/bO8+12eVgktYjak1fs7EJBguCJPmJoHQV4alsvz1 mF9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Pt64RIcODeQjneq8j3TjAtIiNmyobDs0m2HCif4NPjg=; b=BXgEhtsKPjh6x77PNBgF5Dlh4FMeEkSJByOed4JrRhZPrX09px+QuxjGMDWbom/Nac w0xjnThOH8ng5/7AbK/eSR41Ox6fOdfXnVTpIgLik/qq2fkAX1qmiZwk1YT3FwnAWUe4 yebjaA4o0rn3mGadWWe+pzKDJ5tvXtFzC0WRRFVbx6s7v+VjpWO01vhVm7RUcz8Z4AWn /LViC86Avy5O/0whx4dgndgb4V6QqyXBhLcGWKJXF1es5/iAOBZ/u0iIF8RsMQgkYZVS ovdujctW4UJJQj5niH5tDXUicTigLcgiYsc6+XXzaV7aB8L9IUPVYHifZrF3rFGhiMzs Z9iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vIu0FvNl; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a90si1316251plc.284.2019.06.06.02.02.56; Thu, 06 Jun 2019 02:03:13 -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; dkim=pass header.i=@linaro.org header.s=google header.b=vIu0FvNl; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727659AbfFFJBg (ORCPT + 99 others); Thu, 6 Jun 2019 05:01:36 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40494 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727538AbfFFJBf (ORCPT ); Thu, 6 Jun 2019 05:01:35 -0400 Received: by mail-wr1-f65.google.com with SMTP id p11so1534793wre.7 for ; Thu, 06 Jun 2019 02:01:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Pt64RIcODeQjneq8j3TjAtIiNmyobDs0m2HCif4NPjg=; b=vIu0FvNlqJvgl8zP64XtXNAaPJgxxguxSD89gPSXVdcqwbaYlQfkljhRw7+PJANJc0 ll6HngdXaMicahymLrcQ0KY6bsbAHZekqwiMQMKAfOo4vraXPqxYL1gInpEWC9qX5wDc aQsxWFC5n7LCYyRFUZnYjUuHd9iZnE5Qh5TtzI4Yfhdnye5PttAIFjhkVzbbGqFGPtn4 nPjduUdH6GTqNE4ZxmZ9zeS210qPYYFVd2pkKaRKtg6TFFQvBVRZa7AYFe1C7q30mExQ Cfyo/gDIFGqnhmcZ89HzuIUZRLUicghXpF5xUTSqrr/+s4D5xQMb8oVDi/YNnvzB88dH YB1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Pt64RIcODeQjneq8j3TjAtIiNmyobDs0m2HCif4NPjg=; b=o9cTEGwMwAtGanEco2paEXu5ScNu1gKvvZfhcNHkppkIWl+Eag7vcrfloCxiU+Qxtg lrgOsNPVCTL0mEH0NICsOjEsgHrNeedUrjwKiqSDFrVH8nDMhTU60DYTW8IatWqgzQsf LsWf6kZjwjgGPXhyX9G+TElfUzZ0dHJ8S1p/vY661vA7/uZo1ejBl05barwzuHZkAuhU w5c6vR/92oRangcNVa32Fee4kavwa282ygBHRkZ0AB5t56vXYlYi61Z4KnPE1vJplKc6 4UlGW260K/d0DAKudRThCDTRDj9CvMyZro7h8j3JHiXYbEBFGoXBOrmEy2u8nWt2CCxO id7A== X-Gm-Message-State: APjAAAXNxAngZMnqX4Oz4EhhIm4qX2uylcO/r44MD8s5HPwja44cTN0F 58K6E++zqYzgthdKI0WgGWcNJw== X-Received: by 2002:adf:dd91:: with SMTP id x17mr17413345wrl.291.1559811693630; Thu, 06 Jun 2019 02:01:33 -0700 (PDT) Received: from [192.168.86.34] (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.googlemail.com with ESMTPSA id y2sm1390830wra.58.2019.06.06.02.01.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jun 2019 02:01:32 -0700 (PDT) Subject: Re: [PATCH 02/13] bus_find_device: Unify the match callback with class_find_device To: Suzuki K Poulose , linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, Alexander Shishkin , Andrew Lunn , Andreas Noever , Arnd Bergmann , Bjorn Helgaas , Corey Minyard , Christian Borntraeger , David Kershner , "David S. Miller" , David Airlie , Felipe Balbi , Frank Rowand , Grygorii Strashko , Harald Freudenberger , Hartmut Knaack , Heiko Stuebner , Jason Gunthorpe , Jonathan Cameron , "James E.J. Bottomley" , Len Brown , Mark Brown , Michael Ellerman , Michael Jamet , "Martin K. Petersen" , Peter Oberparleiter , Rob Herring , Sebastian Ott , Yehezkel Bernat , Wolfram Sang References: <1559747630-28065-1-git-send-email-suzuki.poulose@arm.com> <1559747630-28065-3-git-send-email-suzuki.poulose@arm.com> From: Srinivas Kandagatla Message-ID: <958acbca-5322-d079-2d88-591ed3d12ed7@linaro.org> Date: Thu, 6 Jun 2019 10:01:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1559747630-28065-3-git-send-email-suzuki.poulose@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/06/2019 16:13, Suzuki K Poulose wrote: > There is an arbitrary difference between the prototypes of > bus_find_device() and class_find_device() preventing their callers > from passing the same pair of data and match() arguments to both of > them, which is the const qualifier used in the prototype of > class_find_device(). If that qualifier is also used in the > bus_find_device() prototype, it will be possible to pass the same > match() callback function to both bus_find_device() and > class_find_device(), which will allow some optimizations to be made in > order to avoid code duplication going forward. Also with that, constify > the "data" parameter as it is passed as a const to the match function. > > For this reason, change the prototype of bus_find_device() to match > the prototype of class_find_device() and adjust its callers to use the > const qualifier in accordance with the new prototype of it. > > Cc: Alexander Shishkin > Cc: Andrew Lunn > Cc: Andreas Noever > Cc: Arnd Bergmann > Cc: Bjorn Helgaas > Cc: Corey Minyard > Cc: Christian Borntraeger > Cc: David Kershner > Cc: "David S. Miller" > Cc: David Airlie > Cc: Felipe Balbi > Cc: Frank Rowand > Cc: Grygorii Strashko > Cc: Harald Freudenberger > Cc: Hartmut Knaack > Cc: Heiko Stuebner > Cc: Jason Gunthorpe > Cc: Jonathan Cameron > Cc: Jonathan Cameron > Cc: "James E.J. Bottomley" > Cc: Len Brown > Cc: Mark Brown > Cc: Michael Ellerman > Cc: Michael Jamet > Cc: "Martin K. Petersen" > Cc: Peter Oberparleiter > Cc: Rob Herring > Cc: Sebastian Ott > Cc: Srinivas Kandagatla > Cc: Yehezkel Bernat > Cc: Wolfram Sang > Cc:rafael@kernel.org > Cc: Greg Kroah-Hartman > Signed-off-by: Suzuki K Poulose > --- > arch/powerpc/platforms/pseries/ibmebus.c | 4 ++-- > drivers/acpi/acpi_lpss.c | 4 ++-- > drivers/acpi/sleep.c | 2 +- > drivers/acpi/utils.c | 4 ++-- > drivers/base/bus.c | 6 +++--- > drivers/base/devcon.c | 2 +- > drivers/char/ipmi/ipmi_si_platform.c | 2 +- > drivers/firmware/efi/dev-path-parser.c | 4 ++-- > drivers/gpu/drm/drm_mipi_dsi.c | 2 +- > drivers/hwtracing/coresight/coresight.c | 6 +++--- > drivers/hwtracing/coresight/of_coresight.c | 2 +- > drivers/hwtracing/intel_th/core.c | 5 ++--- > drivers/i2c/i2c-core-acpi.c | 4 ++-- > drivers/i2c/i2c-core-of.c | 4 ++-- > drivers/iio/inkern.c | 2 +- > drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +- > drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 2 +- > drivers/net/ethernet/ti/cpsw-phy-sel.c | 4 ++-- > drivers/net/ethernet/ti/davinci_emac.c | 2 +- > drivers/net/ethernet/toshiba/tc35815.c | 4 ++-- > drivers/nvmem/core.c | 2 +- For NVMEM changes, Acked-by: Srinivas Kandagatla --srini