lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 14 Oct 2015 04:47:31 +0000
From:	Yuval Mintz <Yuval.Mintz@...gic.com>
To:	Francois Romieu <romieu@...zoreil.com>
CC:	netdev <netdev@...r.kernel.org>,
	Ariel Elior <Ariel.Elior@...gic.com>
Subject: RE: [PATCH net-next v5 01/10] qed: Add module with basic common
 support

> Yuval Mintz <Yuval.Mintz@...gic.com> :
> [...]
> > > > +struct qed_simd_fp_handler {
> > > > +     void    *token;
> > > > +     void    (*func)(void *);
> > > > +};
> > > Use union * ?
> > The token is a cookie to be used by a func, so union isn't appropriate.
> 
> Lets' reformulate: replace 'void * token' by 'union foobar *token'.
> 
> void * silents compiler. union * doesn't.

Not sure I get you here - this hander is used for registering interrupt handlers
in case INTa is used, and multiple modules [both QED and the appropriate
protocol driver] need to use it.
Turning this into an explicit union would require QED to be familiar with the
ISR cookies of all the various protocol drivers. While possible, it'll create
additional .h dependencies between those in a direction that currently doesn't
exist [I.e., QED would have to include protocol driver .h for it].

> 
> [...]
> > > > +             rc = -ENOMEM;
> > > > +             goto ilt_shadow_fail;
> > > > +     } else {
> > > > +             DP_VERBOSE(p_hwfn, QED_MSG_ILT,
> > > > +                        "Allocated 0x%x bytes for ilt shadow\n",
> > > > +                        (u32)(size * sizeof(struct qed_dma_mem)));
> > > > +     }
> > > The "else" branch after the "goto" isn't idiomatic.
> > Not that I mind, but is such a prefernce described in any style-guide?
> 
> Documentation/CodingStyle gives some hints in its "goto" section but it doesn't
> specifically go that far. Is there a reward if I can exhumate some message on
> netdev where it would had already been outlined ?

Depends. Do you consider wasted time to be a reward? ;-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists