Re: [PATCH v2 5/8] fwctl: FWCTL_RPC to execute a Remote Procedure Call to device firmware

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

 



On Tue, Jul 30, 2024 at 11:00:38AM +0300, Leon Romanovsky wrote:
> > +
> > +	void *inbuf __free(kvfree) =
> > +		kvzalloc(cmd->in_len, GFP_KERNEL | GFP_KERNEL_ACCOUNT);
> 
> 
> <...>
> 
> > +	out_len = cmd->out_len;
> > +	void *outbuf __free(kvfree_errptr) = fwctl->ops->fw_rpc(
> > +		ucmd->uctx, cmd->scope, inbuf, cmd->in_len, &out_len);
> 
> I was under impression that declaration of variables in C should be at the beginning
> of block. Was it changed for the kernel?

Yes, the compiler check blocking variables in the body was disabled to
allow cleanup.h

Jonathan said this is the agreed coding style to use for this

Jason




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux