Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4003669ybf; Tue, 3 Mar 2020 17:41:31 -0800 (PST) X-Google-Smtp-Source: ADFU+vtUcQKEErdCvNeRlJ3M3iD9J6ph5HurTpJJ/MPPJrM7boIWcNQetxbSlMSz/gglUTrlNeAY X-Received: by 2002:aca:4a4e:: with SMTP id x75mr258652oia.16.1583286091544; Tue, 03 Mar 2020 17:41:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583286091; cv=none; d=google.com; s=arc-20160816; b=GYh/MnZ76TWnHWjh2yNamPfgaIo1vZ1fjH2nuSMwrUhX51FB8p4YDtswtGBudhZf21 Tb69dA8fb7xIoLDAuyzyDGofSGGBQTRA+4eIE2BxGE+5twYCrHxSX5TI/ZDm4rUVY/lO QjV9w9S+E7tq2nYpRgJmKwk3q2xG7Y1dGQIFRdj5Z78mPF0t7IktKri8VTdBmI41ogrH 92Qv2B/HD+G93FJPaOjqTsC5zvx2HrIrw53qCrsqMTYT5AVXd0xGPlBHPtZyF7a/R87Y hqsNnA/VbZfqGtuCtu2WXKc4p1yBLetG2oC4tOo/KXJLwyneIhV0za4+54iA6yhS6vEh wJGA== 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:cc:to:subject; bh=WrRrFhIKfKH34LLcjefh4Wk9Z4GhR71aIIg78dw7EG4=; b=z2wgm86k9xuT8pz3ZIMtn8sQBL2w6Yog3V1bfGG0lbdusjkhu0ELhhV3g3FHrBHF4+ v9465vDse2IBaoj3s2grT22w1WFOwlCzoG1OPGPn85aWiFcSAFqW/m7zd8Uc2AbG62yT TAxoBx7ki8UeIkeckA3KrcsOBbtRtMtK8vN6QA5sQf3qSgNtFvqDe9nFn3ihZIJwdSW1 lDQs+a8vSj9rJkWgsvvGooTtxzRavlYiU5IOHfDTBmsM8L+Naz1nz5IoBHzbGtdOO/gt ak2m3RkGPBA+WioyFeOmI6PZBKe1NuHtTtZvN4Eb5M8q+gkcSj6PiU1Ze0I1JpKfTj3t I3QA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5si313325ots.233.2020.03.03.17.41.19; Tue, 03 Mar 2020 17:41:31 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387508AbgCDBjs (ORCPT + 99 others); Tue, 3 Mar 2020 20:39:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:35974 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387476AbgCDBjr (ORCPT ); Tue, 3 Mar 2020 20:39:47 -0500 Received: from [10.44.0.22] (unknown [103.48.210.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 46D6B2073D; Wed, 4 Mar 2020 01:39:44 +0000 (UTC) Subject: Re: [PATCH v5] m68k: Replace setup_irq() by request_irq() To: afzal mohammed Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , Finn Thain References: <20200229153406.GA32479@afzalpc> <20200301012655.GA6035@afzalpc> <20200304013711.GA5470@afzalpc> From: Greg Ungerer Message-ID: <3c721380-2348-dccd-8de8-5ee60a1d5240@linux-m68k.org> Date: Wed, 4 Mar 2020 11:39:41 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200304013711.GA5470@afzalpc> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Afzal, On 4/3/20 11:37 am, afzal mohammed wrote: > Hi Greg, > > On Mon, Mar 02, 2020 at 11:32:53AM +1000, Greg Ungerer wrote: > >> I have retested and everything works as expected, so: >> >> Tested-by: Greg Ungerer >> >> I have applied this to the m68knommu git tree, for next branch. > > Thanks > >>> void hw_timer_init(irq_handler_t handler) >>> { >>> + int r; >> >> You used 'r' here as the error return value holder. >> But in the previous cases you used 'ret'. >> I would have used the same name everywhere ('ret' probably being the >> most commonly used in the kernel). > > That was a circus to dodge 80 char limit, i did think about it while > making the changes whether to do or not. If 'ret' is used request_irq() > line had to be split to two, slightly affecting the readability and > since 'r' was a local variable (though conventionally 'ret' or 'err' > is used) went ahead that way. Even if 're' is used as the local > variable, it would be 81 chars ;) > > Let me know if you want to change it. Understand. No, no need to change it. Regards Greg > Regards > afzal > >>> - setup_irq(MCF_IRQ_TIMER, &mcfslt_timer_irq); >>> + r = request_irq(MCF_IRQ_TIMER, mcfslt_tick, IRQF_TIMER, "timer", NULL); >>> + if (r) { >>> + pr_err("Failed to request irq %d (timer): %pe\n", MCF_IRQ_TIMER, >>> + ERR_PTR(r)); >>> + }