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:	Sat, 03 Mar 2007 16:34:25 +1100
From:	Nigel Cunningham <nigel@...el.suspend2.net>
To:	Tejun Heo <htejun@...il.com>
Cc:	Guennadi Liakhovetski <g.liakhovetski@....de>,
	linux-ide@...r.kernel.org, jgarzik@...ox.com,
	linux-pm@...ts.osdl.org, stable@...nel.org,
	Alan <alan@...rguk.ukuu.org.uk>, linux-kernel@...r.kernel.org
Subject: Re: [linux-pm] [PATCH 2/2 -stable] libata: add missing CONFIG_PM
	in LLDs

Hi.

On Sat, 2007-03-03 at 12:20 +0900, Tejun Heo wrote:
> Hello, Nigel.
> 
> Nigel Cunningham wrote:
> >> Index: work1/drivers/ata/ahci.c
> >> ===================================================================
> >> --- work1.orig/drivers/ata/ahci.c
> >> +++ work1/drivers/ata/ahci.c
> >> @@ -225,10 +225,12 @@ static void ahci_thaw(struct ata_port *a
> >>  static void ahci_error_handler(struct ata_port *ap);
> >>  static void ahci_vt8251_error_handler(struct ata_port *ap);
> >>  static void ahci_post_internal_cmd(struct ata_queued_cmd *qc);
> >> +#ifdef CONFIG_PM
> >>  static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg);
> >>  static int ahci_port_resume(struct ata_port *ap);
> >>  static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
> >>  static int ahci_pci_device_resume(struct pci_dev *pdev);
> > 
> > Wouldn't it be simpler to add
> > 
> > #else
> > #define ahci_port_suspend(port, message) (NULL)
> > 
> > etc (or something similar)?
> 
> ahci_port_suspend() is used to fill ata_port_ops vector, so it needs to
> be a function.  If you're talking about defining NULL function, yeah,
> that will remove half of CONFIG_PMs but would require dummy definitions
> for all functions.  I think both are ugly.  :-)

Yeah, I didn't look really carefully; an empty static function would
have been what I'd have written if I'd paid more attention.

> I'm working on a linker trick.  Please take a look at the following thread.
> 
>   http://thread.gmane.org/gmane.linux.ide/16475

Not familiar with fancy things like that, so I'll just pipe down and
leave you to it :).

Regards,

Nigel

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ