On Fri, Oct 22, 2010 at 05:11:48PM -0700, [email protected] 
wrote:
> From: J Freyensee <[email protected]>
> 
> >From a previous Meego upstream review, it was asked to use
> get_task_comm() for the needs of this driver.  Well, that
> breaks kernel module compilation. The workaround is the
> exact same code found in fs/exec.c was cut-and-pasted and
> made a local static function,
> as it was deemed bad to use the global variable 'current'
> (which other drivers accepted in the kernel do).
> 
> Change-Id: I8290ec594c37801a588c2757a08c91e8f4e2b813

Again, what is with this "Change-Id:" tag?

What is it for?

> Signed-off-by: J Freyensee <[email protected]>
> ---
>  drivers/misc/pti.c |   25 ++++++++++++++++++++++---
>  1 files changed, 22 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/misc/pti.c b/drivers/misc/pti.c
> index f314110..3810127 100644
> --- a/drivers/misc/pti.c
> +++ b/drivers/misc/pti.c
> @@ -148,6 +148,26 @@ static void pti_write_to_aperture(struct masterchannel 
> *mc, u8 *buf, int len)
>  }
>  
>  /**
> + * This function is found in fs/exec.c; however, it is needed
> + * here because there is a kernel bug in which a driver who
> + * uses this function will break compilation if it's configured
> + * as a module.  Despite other drivers already accepted in the
> + * kernel accessing the global 'current' variable freely,
> + * this has been deemed a bad practice, and it was
> + * suggested by upstream reviewers to use get_task_comm().
> + * Thus, the fs/exec.c function code has been copied and renamed
> + * here to suit this driver's needs.
> + */
> +static char *pti_get_task_comm(char *buf, struct task_struct *tsk)

No, export the function if you really need it, don't duplicate it here.

and do you really need it?

thanks,

greg k-h
_______________________________________________
Meego-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel

Reply via email to