Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp687203ybl; Tue, 13 Aug 2019 00:44:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8Dm1OL4uqBWlCCha+kiGXSTpFGUQTwI7W6nYVlygOp7SYVE4KKrO3/b2qFCBp1uqWQwkg X-Received: by 2002:a05:6a00:46:: with SMTP id i6mr10211060pfk.196.1565682282960; Tue, 13 Aug 2019 00:44:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565682282; cv=none; d=google.com; s=arc-20160816; b=KKtJrikfBxNT82lUf1MboXuxxBX8c0Jn0Da3s+8QQ9eUMTB/mUdDuEZB0cXztzDNCl gCxvk3mEendkouajJ/WIQE3NQoT5jQUi8WrvZ7KoPwhmBnv5uWRLGttCTabnNqtwIeEm 5C7BVTjNX6aCFAuwtiQJdeg4mym7LMDXnOlzURz5NAxOvitnhyTbkpBdPy4RfP00Rl6U B7z9e8RDnlBh/hlIWCXHIaz07euGn7v9B19yHHySa1NNT1BBA7bUeqyRP/qNgG6Q2hiL PSE6Y5OusW+zy467f4BMZauDbnzzhq3VgZTuC5RyBPJDp3ENInkZeWi1RWEUGYp7YCLn Xt7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=jmgSYaqwXk9iNyRQAajzZfYkuGasJs2iYaU0WIsQS5c=; b=cd+409wvxQnOQT7FiQqzv6JvQ9/6QevqOrXOfWjSoKEU+74Aa2B+vB2S8PqggwZM6Q jJ48mhzFShbThPYppDEnzWLr4222WdX/doz7YxSpyWRfM7PPOE7vR04jhDr0X8Uyj5bq I90JHEmQaK9tWXR8bz8sBEu9Pc0JmedB+h2y1jDcj1QyqT+m1CnURMWreVn0T8OLrKi9 o+rqngop8rdNYgKpvzyu5KGxnnSbot6hG0AyyN20rw2z63r/OqATRk47oV13Y/ljrep1 cv4XQv217Yfub2M+rJ+wjsKz0D7HGlqbcuvTys+KcItDrtpWzMx8B/yEfmA8hBadeDlM WwTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=V6iFRYRx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13si65120671pgu.268.2019.08.13.00.44.27; Tue, 13 Aug 2019 00:44:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=V6iFRYRx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727720AbfHMHn3 (ORCPT + 99 others); Tue, 13 Aug 2019 03:43:29 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:45910 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726810AbfHMHn3 (ORCPT ); Tue, 13 Aug 2019 03:43:29 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x7D7hQux130497; Tue, 13 Aug 2019 02:43:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1565682206; bh=jmgSYaqwXk9iNyRQAajzZfYkuGasJs2iYaU0WIsQS5c=; h=Subject:To:References:From:Date:In-Reply-To; b=V6iFRYRxSpilYbvZmXi2hXkDdYAnfmXMZEUqjecqu8wlzVAo3/LZgUYdyuLYd2NTH 3jHCC6mxY7gZ7n25oGBU3R1HEiUkpboPd8eYpsVkySxiWy2Vp7ONsgLS3zHnD2Rfio eOT//UlU08G2aDuSx8np/mGXzLXae9CNA6N2ynqk= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x7D7hQsj006144 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 13 Aug 2019 02:43:26 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 13 Aug 2019 02:43:26 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 13 Aug 2019 02:43:26 -0500 Received: from [192.168.2.14] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x7D7hP5g027084; Tue, 13 Aug 2019 02:43:25 -0500 Subject: Re: [PATCH v2] bus: ti-sysc: sysc_check_one_child(): Change return type to void To: Nishka Dasgupta , , References: <20190813071714.27970-1-nishkadg.linux@gmail.com> <85a1d7eb-dd9a-2276-ed13-67291188538e@ti.com> <5285a1f4-644c-9e97-6e1c-9b3e66948dca@gmail.com> From: Roger Quadros Message-ID: Date: Tue, 13 Aug 2019 10:43:24 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <5285a1f4-644c-9e97-6e1c-9b3e66948dca@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/08/2019 10:37, Nishka Dasgupta wrote: > On 13/08/19 12:58 PM, Roger Quadros wrote: >> >> >> On 13/08/2019 10:17, Nishka Dasgupta wrote: >>> Change return type of function sysc_check_one_child() from int to void >>> as it always returns 0. Accordingly, at its callsite, delete the >>> variable that previously stored the return value. >>> >>> Signed-off-by: Nishka Dasgupta >>> --- >>> Changes in v2: >>> - Remove error variable entirely. >>> - Change return type of sysc_check_one_child(). >>> >>>   drivers/bus/ti-sysc.c | 9 +++------ >>>   1 file changed, 3 insertions(+), 6 deletions(-) >>> >>> diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c >>> index e6deabd8305d..1c30fa58d70c 100644 >>> --- a/drivers/bus/ti-sysc.c >>> +++ b/drivers/bus/ti-sysc.c >>> @@ -615,8 +615,8 @@ static void sysc_check_quirk_stdout(struct sysc *ddata, >>>    * node but children have "ti,hwmods". These belong to the interconnect >>>    * target node and are managed by this driver. >>>    */ >>> -static int sysc_check_one_child(struct sysc *ddata, >>> -                struct device_node *np) >>> +static void sysc_check_one_child(struct sysc *ddata, >>> +                 struct device_node *np) >>>   { >>>       const char *name; >>>   >> >> You didn't remove the "return 0" at end of this function. >> Doesn't it complain during build? >> >>> @@ -633,12 +633,9 @@ static int sysc_check_one_child(struct sysc *ddata, >>>   static int sysc_check_children(struct sysc *ddata) >>>   { >> >> This could return void as well. > > Okay. Sorry for the errors; I'll fix-up and resend. > > However, while building it, I'm running into a compilation problem: > on line 764 (function sysc_ioremap) there is apparently an "undeclared variable", "SZ_1K". Is it a problem with the architecture? What arch should I compile it with? make ARCH=arm omap2plus_defconfig make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- > > Thanking you, > Nishka > >> >>>       struct device_node *child; >>> -    int error; >>>         for_each_child_of_node(ddata->dev->of_node, child) { >>> -        error = sysc_check_one_child(ddata, child); >>> -        if (error) >>> -            return error; >>> +        sysc_check_one_child(ddata, child); >>>       } >> >> You don't need the braces { }. >> >> Please run ./scripts/checkpatch.pl --strict on your patch and fix any >> issues. >> >>>         return 0; >>> >> >> return not required. >> >> You will also need to fix all instances using sysc_check_children() >> cheers, -roger -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki