Remove trailing white spaces from /proc output. Signed-off-by: Michael Weber --- phc-intel-pack-rev11/inc/2.6.27/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.27/linux-phc-0.3.2.patch @@ -73,7 +73,7 @@ return 0; } -@@ -757,12 +769,477 @@ +@@ -757,12 +769,482 @@ data->resume = 1; return 0; @@ -156,6 +156,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -185,6 +186,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -211,6 +213,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -239,6 +242,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -270,6 +274,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.27.57/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.27.57/linux-phc-0.3.2.patch @@ -74,7 +74,7 @@ return 0; } -@@ -758,12 +770,477 @@ +@@ -758,12 +770,482 @@ data->resume = 1; return 0; @@ -157,6 +157,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -186,6 +187,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -212,6 +214,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -240,6 +243,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -271,6 +275,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.28/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.28/linux-phc-0.3.2.patch @@ -73,7 +73,7 @@ return 0; } -@@ -758,12 +770,477 @@ +@@ -758,12 +770,482 @@ data->resume = 1; return 0; @@ -156,6 +156,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -185,6 +186,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -211,6 +213,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -239,6 +242,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -270,6 +274,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.29/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.29/linux-phc-0.3.2.patch @@ -73,7 +73,7 @@ return 0; } -@@ -778,12 +790,477 @@ +@@ -778,12 +790,482 @@ data->resume = 1; return 0; @@ -156,6 +156,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -185,6 +186,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -211,6 +213,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -239,6 +242,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -270,6 +274,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.29.2/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.29.2/linux-phc-0.3.2.patch @@ -73,7 +73,7 @@ return 0; } -@@ -790,12 +802,477 @@ +@@ -790,12 +802,482 @@ data->resume = 1; return 0; @@ -156,6 +156,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -185,6 +186,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -211,6 +213,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -239,6 +242,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -270,6 +274,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.30/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.30/linux-phc-0.3.2.patch @@ -72,7 +72,7 @@ return 0; } -@@ -797,12 +809,474 @@ +@@ -797,12 +809,479 @@ data->resume = 1; return 0; @@ -152,6 +152,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -181,6 +182,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -207,6 +209,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -235,6 +238,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -266,6 +270,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.31/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.31/linux-phc-0.3.2.patch @@ -73,7 +73,7 @@ return 0; } -@@ -793,12 +805,474 @@ +@@ -793,12 +805,479 @@ data->resume = 1; return 0; @@ -153,6 +153,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -182,6 +183,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -208,6 +210,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -236,6 +239,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -267,6 +271,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.32/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.32/linux-phc-0.3.2.patch @@ -72,7 +72,7 @@ return 0; } -@@ -756,12 +768,474 @@ +@@ -756,12 +768,479 @@ data->resume = 1; return 0; @@ -153,6 +153,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -182,6 +183,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -208,6 +210,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -236,6 +239,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -267,6 +271,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.32.27/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.32.27/linux-phc-0.3.2.patch @@ -73,7 +73,7 @@ return 0; } -@@ -757,12 +769,474 @@ +@@ -757,12 +769,479 @@ data->resume = 1; return 0; @@ -154,6 +154,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -183,6 +184,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -209,6 +211,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -237,6 +240,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -268,6 +272,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.33/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.33/linux-phc-0.3.2.patch @@ -72,7 +72,7 @@ return 0; } -@@ -758,12 +770,474 @@ +@@ -758,12 +770,479 @@ data->resume = 1; return 0; @@ -153,6 +153,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -182,6 +183,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -208,6 +210,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -236,6 +239,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -267,6 +271,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.33.8/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.33.8/linux-phc-0.3.2.patch @@ -73,7 +73,7 @@ return 0; } -@@ -759,12 +771,474 @@ +@@ -759,12 +771,479 @@ data->resume = 1; return 0; @@ -154,6 +154,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -183,6 +184,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -209,6 +211,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -237,6 +240,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -268,6 +272,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.34/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.34/linux-phc-0.3.2.patch @@ -72,7 +72,7 @@ return 0; } -@@ -759,12 +771,474 @@ +@@ -759,12 +771,479 @@ data->resume = 1; return 0; @@ -153,6 +153,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -182,6 +183,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -208,6 +210,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -236,6 +239,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -267,6 +271,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.34.9/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.34.9/linux-phc-0.3.2.patch @@ -73,7 +73,7 @@ return 0; } -@@ -760,12 +772,474 @@ +@@ -760,12 +772,479 @@ data->resume = 1; return 0; @@ -154,6 +154,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -183,6 +184,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -209,6 +211,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -237,6 +240,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -268,6 +272,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.35/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.35/linux-phc-0.3.2.patch @@ -72,7 +72,7 @@ return 0; } -@@ -719,12 +731,474 @@ +@@ -719,12 +731,479 @@ data->resume = 1; return 0; @@ -153,6 +153,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -182,6 +183,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -208,6 +210,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -236,6 +239,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -267,6 +271,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.35.10/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.35.10/linux-phc-0.3.2.patch @@ -73,7 +73,7 @@ return 0; } -@@ -720,12 +732,474 @@ +@@ -720,12 +732,479 @@ data->resume = 1; return 0; @@ -154,6 +154,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -183,6 +184,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -209,6 +211,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -237,6 +240,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -268,6 +272,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.36/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.36/linux-phc-0.3.2.patch @@ -72,7 +72,7 @@ return 0; } -@@ -716,12 +728,474 @@ +@@ -716,12 +728,479 @@ data->resume = 1; return 0; @@ -153,6 +153,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -182,6 +183,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -208,6 +210,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -236,6 +239,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -267,6 +271,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.36.2/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.36.2/linux-phc-0.3.2.patch @@ -73,7 +73,7 @@ return 0; } -@@ -717,12 +729,474 @@ +@@ -717,12 +729,479 @@ data->resume = 1; return 0; @@ -154,6 +154,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -183,6 +184,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -209,6 +211,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -237,6 +240,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -268,6 +272,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/2.6.37/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/2.6.37/linux-phc-0.3.2.patch @@ -71,7 +71,7 @@ } return 0; -@@ -717,12 +729,474 @@ +@@ -717,12 +729,479 @@ data->resume = 1; return 0; @@ -152,6 +152,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -181,6 +182,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -207,6 +209,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -235,6 +238,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -266,6 +270,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/3.10/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/3.10/linux-phc-0.3.2.patch @@ -120,7 +120,7 @@ if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { msrs = msrs_alloc(); -@@ -963,10 +965,484 @@ +@@ -963,10 +965,489 @@ msrs_free(msrs); msrs = NULL; } @@ -198,6 +198,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -227,6 +228,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -253,6 +255,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -281,6 +284,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -312,6 +316,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/3.11/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/3.11/linux-phc-0.3.2.patch @@ -122,7 +122,7 @@ if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { msrs = msrs_alloc(); -@@ -986,10 +987,485 @@ +@@ -986,10 +987,490 @@ msrs_free(msrs); msrs = NULL; } @@ -200,6 +200,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -229,6 +230,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -255,6 +257,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -283,6 +286,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -314,6 +318,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/3.7.5/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/3.7.5/linux-phc-0.3.2.patch @@ -120,7 +120,7 @@ if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { msrs = msrs_alloc(); -@@ -966,10 +968,484 @@ +@@ -966,10 +968,489 @@ msrs_free(msrs); msrs = NULL; } @@ -198,6 +198,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -227,6 +228,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -253,6 +255,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -281,6 +284,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -312,6 +316,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; --- phc-intel-pack-rev11/inc/3.9/linux-phc-0.3.2.patch +++ phc-intel-pack-rev11/inc/3.9/linux-phc-0.3.2.patch @@ -120,7 +120,7 @@ if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { msrs = msrs_alloc(); -@@ -970,10 +972,484 @@ +@@ -970,10 +972,489 @@ msrs_free(msrs); msrs = NULL; } @@ -198,6 +198,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -227,6 +228,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -253,6 +255,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -281,6 +284,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -312,6 +316,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].index]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; Remove trailing white spaces from /proc output. Signed-off-by: Michael Weber --- phc-intel-pack-rev12/inc/3.12/linux-phc-0.3.2.patch +++ phc-intel-pack-rev12/inc/3.12/linux-phc-0.3.2.patch @@ -97,7 +97,7 @@ static void __init acpi_cpufreq_boost_init(void) { if (boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)) { -@@ -982,6 +983,480 @@ +@@ -982,6 +983,485 @@ } } @@ -173,6 +173,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -202,6 +203,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + count += sprintf(&buf[count], "%u ", vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -228,6 +230,7 @@ + fid = extract_fid_from_control(acpi_data->states[freq_table[i].driver_data].control); + count += sprintf(&buf[count], "%u ", fid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -256,6 +259,7 @@ + vid = extract_vid_from_control(acpi_data->states[freq_table[i].driver_data].control); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count; @@ -287,6 +291,7 @@ + vid = extract_vid_from_control(data->original_controls[freq_table[i].driver_data]); + count += sprintf(&buf[count], "%u:%u ", fid, vid); + } ++ if (count) count--; + count += sprintf(&buf[count], "\n"); + + return count;