Re: [Pcihpd-discuss] [PATCH 1/4] Fix PCIe hotplug for non-ACPI ExpressCard slots (version 2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux