From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4099E193067 for ; Wed, 10 Jul 2024 13:37:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=145.40.73.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720618677; cv=none; b=drGon0RcA2LdJVzQEv+KtvbdW5DqcA89L4LsUlBEZAPUQta/FiNo6bBmtNaiT6Zp2hpz9QoqH4VKTt/GQrS4maDXZLR/JwJL6mhkjCupEGgd8IW1iHlzyiRZSKHEomx+MB2Z0LxwGAU8DhccgboC41fq3Pm+oQk+PbfxGz7BnGY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720618677; c=relaxed/simple; bh=++gOqx0AOCHPw/QIqgTzJc//pa7fEsdTH3n+2JOdDTg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EbeCCnBRdbjpG6ASYI47X8lT4g3R6fdTmDCBAEMfYI8JAcEMz+obozOFxY9yyREEGxO5I7EFAcDjImHUMKEVsfP/WVM6i1SiuOWUGAlczEBp036ovgALCFWNeWhhTZNY+/1vLFozzxSnJTIqAlUosj2IIZktw6ouNbRbvjiTxEw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=y7X8EMUg; arc=none smtp.client-ip=145.40.73.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="y7X8EMUg" Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id D28E2CE16B6; Wed, 10 Jul 2024 13:37:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC22DC32781; Wed, 10 Jul 2024 13:37:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1720618672; bh=++gOqx0AOCHPw/QIqgTzJc//pa7fEsdTH3n+2JOdDTg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=y7X8EMUg/89nhrALzuUAgFd7mCazxXozUFEDUeXZwhWMDezVTbSga7NJZp8Sd8z3C PvIZj/hLB0YVvsGYp9SVloyqXCudJUEU507c5XD1oh7CZNI5XIWjfJX5WXI48tkwNv WMji1IYTM+D/CCP5J6I3M/nx3SPCciWeFfNkwL3s= Date: Wed, 10 Jul 2024 15:37:49 +0200 From: Greg Kroah-Hartman To: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dio: Have dio_bus_match() callback take a const * Message-ID: <2024071034-dealer-uncover-0794@gregkh> References: <20240710074452.2841173-1-geert@linux-m68k.org> <2024071031-afterglow-porridge-de26@gregkh> Precedence: bulk X-Mailing-List: linux-m68k@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2024071031-afterglow-porridge-de26@gregkh> On Wed, Jul 10, 2024 at 09:47:47AM +0200, Greg Kroah-Hartman wrote: > On Wed, Jul 10, 2024 at 09:44:52AM +0200, Geert Uytterhoeven wrote: > > drivers/dio/dio-driver.c:128:11: error: initialization of ‘int (*)(struct device *, const struct device_driver *)’ from incompatible pointer type ‘int (*)(struct device *, struct device_driver *)’ [-Werror=incompatible-pointer-types] > > 128 | .match = dio_bus_match, > > | ^~~~~~~~~~~~~ > > drivers/dio/dio-driver.c:128:11: note: (near initialization for ‘dio_bus_type.match’) > > > > Reported-by: noreply@ellerman.id.au > > Fixes: d69d804845985c29 ("driver core: have match() callback in struct bus_type take a const *") > > Signed-off-by: Geert Uytterhoeven > > --- > > drivers/dio/dio-driver.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/dio/dio-driver.c b/drivers/dio/dio-driver.c > > index 2d9fa6011945d88b..12fa2d209dab9d3c 100644 > > --- a/drivers/dio/dio-driver.c > > +++ b/drivers/dio/dio-driver.c > > @@ -110,10 +110,10 @@ void dio_unregister_driver(struct dio_driver *drv) > > * and 0 if there is no match. > > */ > > > > -static int dio_bus_match(struct device *dev, struct device_driver *drv) > > +static int dio_bus_match(struct device *dev, const struct device_driver *drv) > > { > > struct dio_dev *d = to_dio_dev(dev); > > - struct dio_driver *dio_drv = to_dio_driver(drv); > > + const struct dio_driver *dio_drv = to_dio_driver(drv); > > Same here, to_dio_driver() should be changed to use container_of_const() I've added that to the change when I've merged this to my tree, thanks! greg k-h