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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 30 Jan 2017 14:34:02 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Richard Cochran' <richardcochran@...il.com>,
        Sudarsana Kalluru <Sudarsana.Kalluru@...ium.com>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "Yuval.Mintz@...ium.com" <Yuval.Mintz@...ium.com>
Subject: RE: [PATCH net-next v2 2/2] qede: Add driver support for PTP.

From: netdev-owner@...r.kernel.org [mailto:netdev-owner@...r.kernel.org] On Behalf Of Richard Cochran
> Sent: 29 January 2017 15:36
...
> > +static int qede_ptp_adjfreq(struct ptp_clock_info *info, s32 ppb)
> > +{
> > +	struct qede_ptp *ptp = container_of(info, struct qede_ptp, clock_info);
> > +	struct qede_dev *edev = ptp->edev;
> > +	int rc;
> > +
> > +	__qede_lock(edev);
> > +	if (edev->state == QEDE_STATE_OPEN) {
> > +		spin_lock_bh(&ptp->lock);
> > +		rc = ptp->ops->adjfreq(edev->cdev, ppb);
> 
> Why add this extra layer of indirection?

There might be two extra layers of indirection!

One can be removed by copying the function vector instead of referencing it.
So that call would be ptp->ops.adjfreq(...).

Even from the later emails I can't see which way around that call is.
How many different implementations of 'ops->adjfreq' are there?
If there is only one you don't need an indirect call.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ