Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp425632lqh; Tue, 7 May 2024 03:35:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXG0qXh3s96ln8mY97pnQNcpfF89TozKw2X7v8FRFetQEPYSC03//qX3ul9GkHutG5mDBn6ZeSNMXddPXNauw6AQHSYwciHpWuiVpCc4Q== X-Google-Smtp-Source: AGHT+IEFWcYtaMbhVnsbsbRfKWuz1YA+FYi2dUyUjpVvF0yDQoR+KfZ38LUmI0Nka/xtqTLZgiFn X-Received: by 2002:a17:90a:3945:b0:2ae:6277:16a with SMTP id n5-20020a17090a394500b002ae6277016amr10638441pjf.36.1715078121383; Tue, 07 May 2024 03:35:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715078121; cv=pass; d=google.com; s=arc-20160816; b=XrRbCRsDQ1y0vZQfW7yEIeSMMQVkmfcHKcLJwDTtV2Y5RLje2lxRIG3S6o7e6b7byN H/fDps82/x6TY1B97l1X02SZs5DJUDxkJPpoSVrXZijW/OOiNaZfLnTAbuPuoRr7haqd eupkBpWdwORSjRNzxaKn+DtpFwgkVa8vvfahmfxxlsFdL7Ho1DlxDKt+9RnjPKMEaOB1 r41IHfTnW/cNDpEbrbwqeSLolNQAaOKFRGvYIVljYtr92ybmcfC2y0X2Z5Wq7z3yIFDa +7acdLco67T/Gz/qhOb7+di7zCcNOlk3rVdEJE8UUIk0Ny7bqKZ7N1a9sLVdNaVxVdyu HgXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:to:dkim-signature :dkim-signature:from; bh=Tx1iOx6iL5l8MnXbGHlbt/Ab5a5r6LT3B6HBF7AzDks=; fh=T0AyOqJHeXn2dQmt98wiCk+ATLXatPr36HLpzEjftL8=; b=tEzB8JPy/+EWvxhzQIpU5ZC6opGvq4LsVva5m4gDq7ij8juxuPddKrOpJ1whKduWY3 dJmvY08TSvwOdJa6ksZsNefWRngJVU/JEcnqwsELY7zwX3dP9S6bBp8IYvVcFZ5K+tSb VOp1WU6HOt/EF8C6qWJWRFNOR9l3nPvdwck0JC1iZwAb3obHvyVLPCkbpFDfSb2ocKP3 pMggIptdOusSD0VR1wrg5llRwuatVYW6rsgBiR++hMBv8g0PPzWuksVpwYlc4rbkbIna WPCjEdc4lmWxJJ37bdbHT5FgZ0cp8YiyanXpvvMt3Fef22ySwqBORz5khktPeMXaV4mK suBA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="0tm8/+1j"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-171083-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171083-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id i6-20020a632206000000b006158115fc78si10013914pgi.587.2024.05.07.03.35.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 03:35:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171083-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="0tm8/+1j"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-171083-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171083-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 08E57B23334 for ; Tue, 7 May 2024 10:22:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7EA6C14E2DA; Tue, 7 May 2024 10:22:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0tm8/+1j"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Re5Qxkcx" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61C9F14E2F0 for ; Tue, 7 May 2024 10:22:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715077335; cv=none; b=bVxIfj0S36wHWDjmSInpxRnm8paJi445Yk/04TN1M2lMQAi2lR/P1U86i+/RiOmAr+kHBjERKD9vSrNyQjEYOfj2ngsr30LNXuexKHKI7paRq/Dq3zuSZDAi2pOn6fiEc5SC6Faj6uq4z0tZOO7T0I149bm72P8vR7RFWzcNtYA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715077335; c=relaxed/simple; bh=utN6QsNDW6/1TqW1p0nlc7DtEq5+tRszYxoklAIovMU=; h=From:To:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=TNiUimF5rY5Qbb9F0fTRyleod1akFq1jULufTzrPL+i1ydQEfYnhk29s+1SpbS6x/0Bz5r+goaJ6TIBK0k+zC46GJCiC+UkhQ0qvQ+Ze0W1TcmN4uVG0ljPbE02Kn8BxbsNU6r3Q3xjJx2BgjSHuKKUYDpDK7PkK4/kX8JV4xr0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=0tm8/+1j; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Re5Qxkcx; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1715077332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Tx1iOx6iL5l8MnXbGHlbt/Ab5a5r6LT3B6HBF7AzDks=; b=0tm8/+1jYTneFfI0BPn5+TlMzbOBvCidrOzh5a622/jOg5yIE42VTHMjDqsNIfPsP3cGog 2rAV2X34XlKEqxaINEOtfw/6Y9rg21NhgC5v7uo6PmQ0LqpaAdIZ2ZH84VkNDtGVZ5pdEi U72+fHxzmlsAlBv1fxMKyZ1aQYB5bjaVvO0vcUEKEC+DnlFwaosJwwALxRW+iX1ma6jcG3 9Lx2c+nJr9Vv1xMpT7gyfYNfCp7iVFqb/ZyGRvCMnOHW0zLJ0ycxz+ZtRNgd5GKJhLAqqE vPm+7eqgZV9Pdq1Mh4ccywKbRjWqT8w+G+ojwOS5FE51caevdMIOFWvY9EJImw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1715077332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Tx1iOx6iL5l8MnXbGHlbt/Ab5a5r6LT3B6HBF7AzDks=; b=Re5Qxkcx3puoOtE3LRIP40cllBQAurgDPM0Qn6knDzamk9GpqmEyoZ+rdvJmniy3P3Zf/2 uAK9lH8EqD+DOLBw== To: Jinjie Ruan , linux-kernel@vger.kernel.org Subject: Re: [PATCH] genirq/irqdomain: Clean code for __irq_domain_create() In-Reply-To: <887d424c-c6b5-e5c7-21d3-9b920272fbc3@huawei.com> References: <20240430093353.1919862-1-ruanjinjie@huawei.com> <87pltyrf9l.ffs@tglx> <887d424c-c6b5-e5c7-21d3-9b920272fbc3@huawei.com> Date: Tue, 07 May 2024 12:22:12 +0200 Message-ID: <878r0lrkff.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Tue, May 07 2024 at 09:22, Jinjie Ruan wrote: > On 2024/5/7 2:01, Thomas Gleixner wrote: >>> +out: >>> + domain->flags |= IRQ_DOMAIN_NAME_ALLOCATED; >>> + return 0; >> >> This function is horrible. The only shared thing here is the >> domain->flags manipulation. I'm not seeing how this is an improvement. > > Yes, the IRQ_DOMAIN_NAME_ALLOCATED flag is shared, the purpose of this > change is to make the code that allocates the domain name in the > __irq_domain_create() function look like it doesn't take up too much > space, so it looks cleaner. I'm failing to see the cleaner. All this does is shuffling code around for no reason. Thanks, tglx