All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-can@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH 1/2] can: flexcan: make flexcan_priv.devtype_data member point to const data
Date: Mon, 16 Jul 2012 10:28:24 +0200	[thread overview]
Message-ID: <5003D0A8.7000908@pengutronix.de> (raw)
In-Reply-To: <20120716082139.GS592@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 2084 bytes --]

On 07/16/2012 10:21 AM, Uwe Kleine-König wrote:
> Hello,
> 
> On Fri, Jul 13, 2012 at 03:04:23PM +0200, Marc Kleine-Budde wrote:
>> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
>> ---
>>  drivers/net/can/flexcan.c |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
>> index 81324a1..1b6f562 100644
>> --- a/drivers/net/can/flexcan.c
>> +++ b/drivers/net/can/flexcan.c
>> @@ -192,7 +192,7 @@ struct flexcan_priv {
>>  
>>  	struct clk *clk;
>>  	struct flexcan_platform_data *pdata;
>> -	struct flexcan_devtype_data *devtype_data;
>> +	const struct flexcan_devtype_data *devtype_data;
>>  };
>>  
>>  static struct flexcan_devtype_data fsl_p1010_devtype_data = {
>> @@ -960,7 +960,7 @@ static const struct platform_device_id flexcan_id_table[] = {
>>  static int __devinit flexcan_probe(struct platform_device *pdev)
>>  {
>>  	const struct of_device_id *of_id;
>> -	struct flexcan_devtype_data *devtype_data;
>> +	const struct flexcan_devtype_data *devtype_data;
>>  	struct net_device *dev;
>>  	struct flexcan_priv *priv;
>>  	struct resource *mem;
> Maybe this can be squashed into
> 
> 	30c1e67 (can: flexcan: add hardware controller version support)
> 
> (currently in next) together with making fsl_p1010_devtype_data and
> fsl_imx6q_devtype_data const?

Squashing is not possible, because it's already in David's tree. If I
mark fsl_p1010_devtype_data and fsl_imx6q_devtype_data as const, I get
these errors:

drivers/net/can/flexcan.c:950: warning: initialization discards
qualifiers from pointer target type
drivers/net/can/flexcan.c:951: warning: initialization discards
qualifiers from pointer target type

In a tree without you proposed patch.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2012-07-16  8:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-13 13:04 make user of struct of_device_id.data const Marc Kleine-Budde
2012-07-13 13:04 ` [PATCH 1/2] can: flexcan: make flexcan_priv.devtype_data member point to const data Marc Kleine-Budde
2012-07-16  8:21   ` Uwe Kleine-König
2012-07-16  8:28     ` Marc Kleine-Budde [this message]
2012-07-16  9:50       ` Uwe Kleine-König
2012-07-13 13:04 ` [PATCH 2/2] can: mpc5xxx_can: make data in mpc5xxx_can_probe const Marc Kleine-Budde
2012-07-13 13:35 ` make user of struct of_device_id.data const Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5003D0A8.7000908@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.