lkml.org 
[lkml]   [2021]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 2/2] misc: open-dice: Add driver to expose DICE data to userspace
On Wed, Dec 15, 2021 at 04:19:35PM +0100, Greg Kroah-Hartman wrote:
> On Wed, Dec 15, 2021 at 03:04:10PM +0000, David Brazdil wrote:
> > + drvdata = devm_kmalloc(dev, sizeof(*drvdata), GFP_KERNEL);
> > + if (!drvdata)
> > + return -ENOMEM;
> > +
> > + *drvdata = (struct open_dice_drvdata){
> > + .lock = __SPIN_LOCK_UNLOCKED(drvdata->lock),
> > + .rmem = rmem,
> > + .misc = (struct miscdevice){
> > + .parent = dev,
> > + .name = drvdata->name,
> > + .minor = MISC_DYNAMIC_MINOR,
> > + .fops = &open_dice_fops,
> > + .mode = 0600,
> > + },
> > + };
>
> That is a lovely abuse of an implicit memcpy(), took me a while to
> realize what it was doing here...
>
> Anyway, this all looks great to me, I'll wait for the DT maintainers to
> review the dt change before being able to take this through my tree.
> Thanks for the cleanups based on the review, the driver is now almost
> 1/3 smaller than your first version with more functionality!

Thanks, and thank your for your help!

David

\
 
 \ /
  Last update: 2021-12-15 16:46    [W:2.222 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site