Re: [PATCH RESEND] ata_piix: minor typo and a printk fix

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

 



Hello,

On Fri, Sep 27, 2013 at 03:45:56PM +0200, Levente Kurusa wrote:
> @@ -1364,38 +1364,56 @@ static const int *piix_init_sata_map(struct
> pci_dev *pdev,
>  	const int *map;
>  	int i, invalid_map = 0;
>  	u8 map_value;
> +	char *mapdata[4];

	char buf[32];
	char *p = buf, *end = buf + sizeof(buf);

> 
>  	pci_read_config_byte(pdev, ICH5_PMR, &map_value);
> 
>  	map = map_db->map[map_value & map_db->mask];
> 
> -	dev_info(&pdev->dev, "MAP [");
>  	for (i = 0; i < 4; i++) {
>  		switch (map[i]) {
>  		case RV:
>  			invalid_map = 1;
> -			pr_cont(" XX");
> +			mapdata[i] = " XX";
>  			break;
> 
>  		case NA:
> -			pr_cont(" --");
> +			mapdata[i] = " --";
>  			break;
> 
>  		case IDE:
>  			WARN_ON((i & 1) || map[i + 1] != IDE);
>  			pinfo[i / 2] = piix_port_info[ich_pata_100];
>  			i++;
> -			pr_cont(" IDE IDE");
> +			mapdata[i] = " IDE IDE";
>  			break;
> 
> +		case P0:
> +			mapdata[i] = " P0";
> +			goto flag;
> +
> +		case P1:
> +			mapdata[i] = " P1";
> +			goto flag;
> +
> +		case P2:
> +			mapdata[i] = " P2";
> +			goto flag;
> +
> +		case P3:
> +			mapdata[i] = " P3";
> +			goto flag;
> +

	p += scnprintf(p, end - p, " P%d", map[i]);

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux