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]
Message-ID: <20071017032907.GA16728@parisc-linux.org>
Date:	Tue, 16 Oct 2007 21:29:07 -0600
From:	Matthew Wilcox <matthew@....cx>
To:	Mark Lord <lkml@....ca>
Cc:	Kristen Carlson Accardi <kristen.c.accardi@...el.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Greg KH <greg@...ah.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Theodore Tso <tytso@....edu>,
	pcihpd-discuss@...ts.sourceforge.net
Subject: Re: [Pcihpd-discuss] [PATCH 1/4] Fix PCIe hotplug for non-ACPI ExpressCard slots (version 2)

On Tue, Oct 16, 2007 at 09:54:08PM -0400, Mark Lord wrote:
> -	t_slot->hpc_ops->get_adapter_status(t_slot, &value); /* Check if slot is occupied */
> +	/* Check if slot is occupied */
> +	t_slot->hpc_ops->get_adapter_status(t_slot, &value);
>  	if ((POWER_CTRL(ctrl->ctrlcap)) && !value) {
> -		rc = t_slot->hpc_ops->power_off_slot(t_slot); /* Power off slot if not occupied*/
> +		/* Power off slot if not occupied*/
> +		rc = t_slot->hpc_ops->power_off_slot(t_slot);

I'd argue these comments fall under "stating the bleedin' obvious", but
that's Kristen's call.

>  	case INT_PRESENCE_OFF:
>  		if (!HP_SUPR_RM(ctrl->ctrlcap))
>  			break;
> -		dbg("Surprise Removal\n");
> +		dbg("Surprise Event\n");
>  		update_slot_info(p_slot);
>  		handle_surprise_event(p_slot);
>  		break;

That doesn't seem like an obviously correct change to me.  Can you
explain?

> -	if (((cap_reg & SLOT_IMPL) == 0) || (((cap_reg & DEV_PORT_TYPE) != 0x0040)
> +	if (((cap_reg & SLOT_IMPL) == 0)
> +		|| (((cap_reg & DEV_PORT_TYPE) != 0x0040)
>  		&& ((cap_reg & DEV_PORT_TYPE) != 0x0060))) {
> -		dbg("%s : This is not a root port or the port is not connected to a slot\n", __FUNCTION__);
> +		dbg("%s : This is not a root port"
> +		" or the port is not connected to a slot\n", __FUNCTION__);
>  		goto abort_free_ctlr;

Normal style would be more like ...

	if (((cap_reg & SLOT_IMPL) == 0) ||
	    (((cap_reg & DEV_PORT_TYPE) != 0x0040) &&
	     ((cap_reg & DEV_PORT_TYPE) != 0x0060))) {
		dbg("%s : This is not a root port or the port is not "
		    "connected to a slot\n", __FUNCTION__);

> -	info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", pdev->vendor, pdev->device, 
> +	info("HPC vendor_id %x device_id %x ss_vid %x"
> +		" ss_did %x\n", pdev->vendor, pdev->device,
>  		pdev->subsystem_vendor, pdev->subsystem_device);

Why did you choose to break the format string?

	info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n",
		pdev->vendor, pdev->device,
		pdev->subsystem_vendor, pdev->subsystem_device);

> -	temp_word = (temp_word & ~HP_INTR_ENABLE & ~CMD_CMPL_INTR_ENABLE) | 0x00;
> +	temp_word = (temp_word & ~HP_INTR_ENABLE & ~CMD_CMPL_INTR_ENABLE)|0x00;

Just delete the | 0x00?

> -	temp_word = (temp_word & ~intr_enable) | intr_enable; 
> +	temp_word = (temp_word & ~intr_enable) | intr_enable;

*boggle*
	temp_word |= intr_enable;

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
-
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