Re: [PATCH] Staging: lustre: ptlrpc: Make struct static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 26, 2015 at 12:22:34AM +0530, Shraddha Barke wrote:
> Make struct static and remove definition from header file since the
> struct is accessed only in this particular file
> 
> Signed-off-by: Shraddha Barke <shraddha.6596@xxxxxxxxx>
> ---

Build fails with this patch with the error:
In function ‘ptlrpc_init’:
 error: ‘ptlrpc_all_services_mutex’ undeclared (first use in this function)
   mutex_init(&ptlrpc_all_services_mutex);

Please always buildtest your patch.

struct mutex ptlrpc_all_services_mutex is also used in ptlrpc/nrs.c and
in ptlrpc/ptlrpc_module.c

regards
sudip




>  drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 2 +-
>  drivers/staging/lustre/lustre/ptlrpc/service.c         | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
> index 34c7e28..f1b2538 100644
> --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
> +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h
> @@ -46,7 +46,7 @@ struct obd_import;
>  struct ldlm_res_id;
>  struct ptlrpc_request_set;
>  extern int test_req_buffer_pressure;
> -extern struct mutex ptlrpc_all_services_mutex;
> +
>  
>  int ptlrpc_start_thread(struct ptlrpc_service_part *svcpt, int wait);
>  /* ptlrpcd.c */
> diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c
> index 40de622..405cc0e 100644
> --- a/drivers/staging/lustre/lustre/ptlrpc/service.c
> +++ b/drivers/staging/lustre/lustre/ptlrpc/service.c
> @@ -67,7 +67,7 @@ static void ptlrpc_at_remove_timed(struct ptlrpc_request *req);
>  /** Holds a list of all PTLRPC services */
>  LIST_HEAD(ptlrpc_all_services);
>  /** Used to protect the \e ptlrpc_all_services list */
> -struct mutex ptlrpc_all_services_mutex;
> +static struct mutex ptlrpc_all_services_mutex;
>  
>  static struct ptlrpc_request_buffer_desc *
>  ptlrpc_alloc_rqbd(struct ptlrpc_service_part *svcpt)
> -- 
> 2.1.4
> 
> _______________________________________________
> devel mailing list
> devel@xxxxxxxxxxxxxxxxxxxxxx
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux