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=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 38913C2D0E4 for ; Tue, 24 Nov 2020 10:59:03 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4AA1B2076B for ; Tue, 24 Nov 2020 10:59:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ozlabs-ru.20150623.gappssmtp.com header.i=@ozlabs-ru.20150623.gappssmtp.com header.b="SSOV3AHK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AA1B2076B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4CgLcN0f1kzDqY7 for ; Tue, 24 Nov 2020 21:59:00 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.ru (client-ip=2607:f8b0:4864:20::444; helo=mail-pf1-x444.google.com; envelope-from=aik@ozlabs.ru; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.ru Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ozlabs-ru.20150623.gappssmtp.com header.i=@ozlabs-ru.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=SSOV3AHK; dkim-atps=neutral Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4CgLYy2tkbzDqQG for ; Tue, 24 Nov 2020 21:56:48 +1100 (AEDT) Received: by mail-pf1-x444.google.com with SMTP id e8so6227684pfh.2 for ; Tue, 24 Nov 2020 02:56:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ozlabs-ru.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ho+OU1gWIbxlU6vkFFYhPItLBY/4CgC1Ux1l0SznRAg=; b=SSOV3AHKcYwB6+VVY1RKwf3eonAoK6VB7pgCtKHR8LD3fRuhXLehOkIUQSnbQIDI4/ p3q0lllVhyARw/nFniVJuSZDSA1nyuupwNNDJFfBpDHPMhOE1FaqJl/r4F+EjejdwGh6 JcTYJjpYmkK5vvITW2a+tZh4AjKcXiOtBFjVSdkurRhJSjv91DLg2qu+cCdrKbmCH2ek XlPQWnIeN1dG8UEFO7U6FU5ocZw0syYsyS7a7xM2lRPAMw13hOx8/vzLXyLbY8/o4EiN 9GUnx1vWcyBeLGNll61sm78qt98gQpFgpeGDJx/kqBx4w5ovOS0zJDPQfVVMkvsWOSLZ 1UcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ho+OU1gWIbxlU6vkFFYhPItLBY/4CgC1Ux1l0SznRAg=; b=XAdfHBQO7FrFdKGhCyewfImWGZdfGdlyKFPfZ+zaSsnUXtZjUHo5dv24lXEybhhn51 84hnHcwyVbAUH6OiOYcbVgsxwNksO4EcImmIIUYXP8DT13Hc+6E2Oxbhhj2GQSzb+uYz ggViw4HCrDHKUotU1Y+yNTZcxYw60UyTbrbgQxjExfQXFMTexGP40C3OI0HpzO3rehCc PZNzjb59oav66Fc/xKx18YrhMAUobgoKoMl0rEUR+hwC09EVnd8jaHVVNnGj7r4RMtFZ XOVpE9r5JFXHcIu7s7moewsD1dNata0JfEzlXkvdbtRzyi6W44qqa31waJc2NBTuijv2 zGPQ== X-Gm-Message-State: AOAM530z44HHat447cT9bKO/FwLtqI/nN4WNfI+kqZhjJQ5/9mIx0LiD CGJi477HMWlv78EWHqzh0o0v2Rxo6nEEqQ== X-Google-Smtp-Source: ABdhPJx7aupXyGjbsXOlPp/GgIVXYWhXASJLws7GvUy6w0exJM/+0lrVY6h+M0ix3HjuU4jTiROcvg== X-Received: by 2002:a17:90b:4398:: with SMTP id in24mr4069757pjb.188.1606215404113; Tue, 24 Nov 2020 02:56:44 -0800 (PST) Received: from [0.0.0.0] (124-171-134-245.dyn.iinet.net.au. [124.171.134.245]) by smtp.gmail.com with UTF8SMTPSA id j10sm1087588pji.29.2020.11.24.02.56.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Nov 2020 02:56:43 -0800 (PST) Subject: Re: [PATCH kernel v4 2/8] genirq/irqdomain: Clean legacy IRQ allocation To: Andy Shevchenko References: <20201124061720.86766-1-aik@ozlabs.ru> <20201124061720.86766-3-aik@ozlabs.ru> From: Alexey Kardashevskiy Message-ID: <38b803db-2d67-dfa0-7e7b-e4ce816576ad@ozlabs.ru> Date: Tue, 24 Nov 2020 21:56:36 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , "maintainer:X86 ARCHITECTURE \(32-BIT AND 64-BIT\)" , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , Oliver O'Halloran , =?UTF-8?Q?C=c3=a9dric_Le_Goater?= , Frederic Barrat , Thomas Gleixner , =?UTF-8?Q?Michal_Such=c3=a1nek?= , "open list:LINUX FOR POWERPC PA SEMI PWRFICIENT" , linux-arm Mailing List Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 11/24/20 8:19 PM, Andy Shevchenko wrote: > On Tue, Nov 24, 2020 at 8:20 AM Alexey Kardashevskiy wrote: >> >> There are 10 users of __irq_domain_alloc_irqs() and only one - IOAPIC - >> passes realloc==true. There is no obvious reason for handling this >> specific case in the generic code. >> >> This splits out __irq_domain_alloc_irqs_data() to make it clear what >> IOAPIC does and makes __irq_domain_alloc_irqs() cleaner. >> >> This should cause no behavioral change. > >> + ret = __irq_domain_alloc_irqs_data(domain, virq, nr_irqs, node, arg, affinity); >> + if (ret <= 0) >> goto out_free_desc; > > Was or wasn't 0 considered as error code previously? Oh. I need to clean this up, the idea is since this does not allocate IRQs, this should return error code and not an irq, I'll make this explicit. > >> return virq; > >> out_free_desc: >> irq_free_descs(virq, nr_irqs); >> return ret; > -- Alexey