lkml.org 
[lkml]   [2018]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/9] x86/intel_rdt: Fix MBA parsing callback
On Sat, Sep 15, 2018 at 12:13:53PM +0200, Thomas Gleixner wrote:
> On Fri, 14 Sep 2018, Fenghua Yu wrote:
> > +int parse_bw(void *_data, struct rdt_resource *r, struct rdt_domain *d);
>
> Sorry no. This keeps the code equally error prone as it was. Why is that
> argument a void pointer in the first place?
>
> > extern struct mutex rdtgroup_mutex;
>
> This is a copy of rdt_cbm_parse_data. Sigh.
>
> The right thing to do here is
>
> 1) rename struct rdt_cbm_parse_data to struct rdt_parse_data
>
> 2) Move it to a header file
>
> 3) Change the argument of parse_ctrlval from void * to struct
> rdt_parse_data *
>
> Everything else is just proliferating the initial underlying problem of
> having a void pointer in those callbacks for no reason at all.

Sure. I have updated this patch and patch 2, 4, 5 based on your comments.

Thanks.

-Fenghua

\
 
 \ /
  Last update: 2018-09-16 00:32    [W:0.049 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site