From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1460C433B4 for ; Fri, 2 Apr 2021 09:39:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB2036112F for ; Fri, 2 Apr 2021 09:39:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234761AbhDBJjW (ORCPT ); Fri, 2 Apr 2021 05:39:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:34210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234618AbhDBJjT (ORCPT ); Fri, 2 Apr 2021 05:39:19 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A6B5B610A5; Fri, 2 Apr 2021 09:39:16 +0000 (UTC) Date: Fri, 2 Apr 2021 10:39:27 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: Jonathan Cameron , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen Subject: Re: [PATCH v1 1/2] iio: trigger: Replace explicit casting and wrong specifier with proper one Message-ID: <20210402103927.6758416d@jic23-huawei> In-Reply-To: <20210401145457.12255-1-andriy.shevchenko@linux.intel.com> References: <20210401145457.12255-1-andriy.shevchenko@linux.intel.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Apr 2021 17:54:56 +0300 Andy Shevchenko wrote: > By unknown reason device name is set with an index casted from int > to unsigned long while at the same time with "%ld" specifier. Both parts > seems wrong to me, thus replace replace explicit casting and wrong specifier > with proper one, i.e. "%u". I'm not going to pretend to know what planet I was on when I wrote this :) Series applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to poke at. Thanks, Jonathan > > Signed-off-by: Andy Shevchenko > --- > drivers/iio/industrialio-trigger.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c > index 32ac1bec25e3..77fca24147b2 100644 > --- a/drivers/iio/industrialio-trigger.c > +++ b/drivers/iio/industrialio-trigger.c > @@ -75,8 +75,7 @@ int __iio_trigger_register(struct iio_trigger *trig_info, > return trig_info->id; > > /* Set the name used for the sysfs directory etc */ > - dev_set_name(&trig_info->dev, "trigger%ld", > - (unsigned long) trig_info->id); > + dev_set_name(&trig_info->dev, "trigger%u", trig_info->id); > > ret = device_add(&trig_info->dev); > if (ret)