|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 13/14] passthrough/PCI: rework (s,b,d,f) init of struct pci_dev
On Wed, Sep 02, 2026 at 08:36:27AM +0200, Jan Beulich wrote: > Right now we're casting away const-ness, to initialize the individual > elements despite the field(s) being declared const. Eclair validly > recognizes this as a Misra rule 11.8 violation. Hide this by switching to > the use of memcpy(), deriving the destination address from the (mutable) > struct pci_dev * which we hold in hands. > > No functional change intended. > > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> > --- > Subsequently we may want to further leverage the sbdf local variable we > now have in the function. Yet of course the primary question is: Is this > an okay game to play in the first place? I've wondered the same, while this might be obfuscated enough for Eclair to complain, aren't we still violating the spirit of the rule? Regards, Roger.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |