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:	Fri, 21 Mar 2014 11:30:16 +0100
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Ben Dooks <ben.dooks@...ethink.co.uk>
Cc:	linux-kernel@...ts.codethink.co.uk,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Linux-sh list <linux-sh@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] sh_eth: pm_runtime should not need null operations

Hi Ben,

On Fri, Mar 21, 2014 at 11:15 AM, Ben Dooks <ben.dooks@...ethink.co.uk> wrote:
> The driver has a no-op for the pm_runtime callbacks but
> the pm_runtime core should correctly ignore drivers without
> any pm_rumtime callback ops.

The pm_runtime core doesn't ignore non-existing runtime_{suspend,resume}
callbacks, it turns them into a failure withv -ENOSYS.
Only non-existing runtime_idle callbacks are ignored.

rpm_suspend():

        callback = rpm_get_suspend_cb(dev);

        retval = rpm_callback(callback, dev);
        if (retval)
                goto fail;

(rpm_callback() returns -ENOSYS if !callback).

pm_runtime_force_suspend():

        callback = rpm_get_suspend_cb(dev);

        if (!callback) {
                ret = -ENOSYS;
                goto err;
        }

Same for resume.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ