lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 4 May 2015 14:22:41 -0500
From:	Suman Anna <s-anna@...com>
To:	Andrew Bresticker <abrestic@...omium.org>,
	Stephen Warren <swarren@...dotorg.org>,
	Thierry Reding <thierry.reding@...il.com>,
	Alexandre Courbot <gnurou@...il.com>
CC:	<devicetree@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
	<linux-usb@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>, Jon Hunter <jonathanh@...dia.com>,
	Jassi Brar <jassisinghbrar@...il.com>,
	Ashwin Chaugule <ashwin.chaugule@...aro.org>,
	Ley Foon Tan <lftan@...era.com>
Subject: Re: [PATCH v8 2/9] mailbox: Make mbox_chan_ops const

On 05/04/2015 12:36 PM, Andrew Bresticker wrote:
> The mailbox controller's channel ops ought to be read-only.  Update
> all the mailbox drivers to make their mbox_chan_ops const as well.
> 
> Signed-off-by: Andrew Bresticker <abrestic@...omium.org>
> Cc: Jassi Brar <jassisinghbrar@...il.com>
> Cc: Suman Anna <s-anna@...com>
> Cc: Ashwin Chaugule <ashwin.chaugule@...aro.org>
> Cc: Ley Foon Tan <lftan@...era.com>

Thanks, the new patch looks good.

Acked-by: Suman Anna <s-anna@...com>

> ---
> Changes from v7:
>  - Constify all drivers' mbox_chan_ops.
> No changes from v5/v6.
> New for v5.
> ---
>  drivers/mailbox/arm_mhu.c          | 2 +-
>  drivers/mailbox/mailbox-altera.c   | 2 +-
>  drivers/mailbox/omap-mailbox.c     | 2 +-
>  drivers/mailbox/pcc.c              | 2 +-
>  include/linux/mailbox_controller.h | 2 +-
>  5 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mailbox/arm_mhu.c b/drivers/mailbox/arm_mhu.c
> index ac693c6..d9e99f9 100644
> --- a/drivers/mailbox/arm_mhu.c
> +++ b/drivers/mailbox/arm_mhu.c
> @@ -110,7 +110,7 @@ static void mhu_shutdown(struct mbox_chan *chan)
>  	free_irq(mlink->irq, chan);
>  }
>  
> -static struct mbox_chan_ops mhu_ops = {
> +static const struct mbox_chan_ops mhu_ops = {
>  	.send_data = mhu_send_data,
>  	.startup = mhu_startup,
>  	.shutdown = mhu_shutdown,
> diff --git a/drivers/mailbox/mailbox-altera.c b/drivers/mailbox/mailbox-altera.c
> index a266265..bb682c9 100644
> --- a/drivers/mailbox/mailbox-altera.c
> +++ b/drivers/mailbox/mailbox-altera.c
> @@ -285,7 +285,7 @@ static void altera_mbox_shutdown(struct mbox_chan *chan)
>  	}
>  }
>  
> -static struct mbox_chan_ops altera_mbox_ops = {
> +static const struct mbox_chan_ops altera_mbox_ops = {
>  	.send_data = altera_mbox_send_data,
>  	.startup = altera_mbox_startup,
>  	.shutdown = altera_mbox_shutdown,
> diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c
> index 0f332c1..03f8545 100644
> --- a/drivers/mailbox/omap-mailbox.c
> +++ b/drivers/mailbox/omap-mailbox.c
> @@ -604,7 +604,7 @@ static int omap_mbox_chan_send_data(struct mbox_chan *chan, void *data)
>  	return ret;
>  }
>  
> -static struct mbox_chan_ops omap_mbox_chan_ops = {
> +static const struct mbox_chan_ops omap_mbox_chan_ops = {
>  	.startup        = omap_mbox_chan_startup,
>  	.send_data      = omap_mbox_chan_send_data,
>  	.shutdown       = omap_mbox_chan_shutdown,
> diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
> index 7e91d68..26d121d 100644
> --- a/drivers/mailbox/pcc.c
> +++ b/drivers/mailbox/pcc.c
> @@ -198,7 +198,7 @@ static int pcc_send_data(struct mbox_chan *chan, void *data)
>  	return 0;
>  }
>  
> -static struct mbox_chan_ops pcc_chan_ops = {
> +static const struct mbox_chan_ops pcc_chan_ops = {
>  	.send_data = pcc_send_data,
>  };
>  
> diff --git a/include/linux/mailbox_controller.h b/include/linux/mailbox_controller.h
> index d4cf96f..68c4245 100644
> --- a/include/linux/mailbox_controller.h
> +++ b/include/linux/mailbox_controller.h
> @@ -72,7 +72,7 @@ struct mbox_chan_ops {
>   */
>  struct mbox_controller {
>  	struct device *dev;
> -	struct mbox_chan_ops *ops;
> +	const struct mbox_chan_ops *ops;
>  	struct mbox_chan *chans;
>  	int num_chans;
>  	bool txdone_irq;
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ