public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: "Hanno Böck" <hanno@hboeck.de>
Cc: lenb@kernel.org, linux-kernel@vger.kernel.org,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH] acpi: const-ify functions
Date: Wed, 8 Dec 2010 21:17:36 +0200	[thread overview]
Message-ID: <20101208191736.GA6694@core2.telecom.by> (raw)
In-Reply-To: <201012081925.10292.hanno@hboeck.de>

On Wed, Dec 08, 2010 at 07:25:10PM +0100, Hanno Böck wrote:
> Will const a couple of functions and variables. This is extracted
> from grsecurity (with only a slight modification to limit a line
> to 80 chars).

Why don't they do it themselves? :^)

> Patch is against linux-acpi-2.6 git.
> 
> Similar patches have been sent in the past but not applied,
> supposedly because they weren't sent to subsystem maintainers.
> (I may continue to send similar extracts to other subsystems)
> 
> ---
> Signed-off-by: Hanno Boeck <hanno@hboeck.de>

Signed-off-by should be before --- -- it must make into changelog.

> diff -Naurp linux-acpi-1//drivers/acpi/battery.c linux-acpi-2/drivers/acpi/battery.c
> --- linux-acpi-1//drivers/acpi/battery.c	2010-12-08 18:42:26.187000005 +0100
> +++ linux-acpi-2/drivers/acpi/battery.c	2010-12-08 18:42:53.595000204 +0100
> @@ -851,7 +851,7 @@ DECLARE_FILE_FUNCTIONS(alarm);
>  	}
>  
>  static struct battery_file {
> -	struct file_operations ops;
> +	const struct file_operations ops;

Whoa, does this work?

>  	mode_t mode;
>  	const char *name;
>  } acpi_battery_file[] = {

It maybe better to call proc_create_date() by hand (and even handle
errors gracefully?
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2010-12-08 19:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08 18:25 [PATCH] acpi: const-ify functions Hanno Böck
2010-12-08 19:17 ` Alexey Dobriyan [this message]

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=20101208191736.GA6694@core2.telecom.by \
    --to=adobriyan@gmail.com \
    --cc=hanno@hboeck.de \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox