See checkpatch warning
"Prefer kstrto<type> to single variable sscanf"

Signed-off-by: Fabian Frederick <f...@skynet.be>
---
 arch/powerpc/platforms/cell/cbe_thermal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/cell/cbe_thermal.c 
b/arch/powerpc/platforms/cell/cbe_thermal.c
index 2c15ff0..d71c3c4 100644
--- a/arch/powerpc/platforms/cell/cbe_thermal.c
+++ b/arch/powerpc/platforms/cell/cbe_thermal.c
@@ -129,9 +129,9 @@ static ssize_t store_throttle(struct cbe_pmd_regs __iomem 
*pmd_regs, const char
        u64 new_value;
        int ret;
 
-       ret = sscanf(buf, "%u", &temp);
+       ret = kstrtouint(buf, 0, &temp);
 
-       if (ret != 1 || temp < TEMP_MIN || temp > TEMP_MAX)
+       if (ret || temp < TEMP_MIN || temp > TEMP_MAX)
                return -EINVAL;
 
        new_value = temp_to_reg(temp);
-- 
1.9.1

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to