From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C5D73350D41 for ; Tue, 13 Jan 2026 09:25:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768296303; cv=none; b=H/B4kaCNkii+Rmo8d+tPIINtmbieMWvrpbhPsXLWot1OyavEXFYo7gkbjT+NF+rT5zHnJ8orcmEkiTzF7jTaKY05F3hR5k2P2IH1SH2C8EhqdxmqnF+xJaCwwvRHNLDuI3BexdMwp+536q7zn62MCmDsPGAgQa2RXhnglqzWe/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768296303; c=relaxed/simple; bh=hpTq8VQRuV9p5FQrS8ropPaxGZ0dfLxT/DAZfoSrVZY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=KaExOE4RaiffIIYI/W7ZyKpgccpSWiT7L6Nxb+Sy0Dvz1D553v9Wn+2oitPm9w8fH8ZnH+6hZmdH9fpkoFra1Kboz59gvdKTEKF+zJWA4ZusPPxq5jSUj3JG+UOu/TdsRDIQ+bkQn3UlfzZH6oL21jB0Fv4DUWqyHnQXdpUXbYI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nEB/iUl3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nEB/iUl3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1318EC116C6; Tue, 13 Jan 2026 09:25:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768296302; bh=hpTq8VQRuV9p5FQrS8ropPaxGZ0dfLxT/DAZfoSrVZY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=nEB/iUl3Wtabpm7FjAJ3h2dsXmwzh22Ql6kgAfXUmgF2CkjlNNCncZJoesb/jeG71 nA4SR3Ls2HMEhFBQZKA+MUrIykY9OyrBOIwAV3ENlTgO2skqBuoyUQgNJAv6LEQn06 mJxe6mVOiyctJLSyhjCd9rdHhfZdHxG3AFhAzDTs/Ym14EmbpTiBRnjmPBEFkXoMBR ZBYDqgI01SFCfp7Hvr3ygPJDFBOlrf7yKy6jw18+liWsg6DzLphqPCjVCyr2LbFNI0 5mXv3jZGYdA0Bip9kHE3VfNnl4rgCgsvGx2WOjTMD6isHyHKfTguPpOvWc/vxCHtgW ObDesr8V4JOsQ== From: Thomas Gleixner To: Imran Khan Cc: linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2] genirq/cpuhotpug: notify of irq affinity change for offlined cpu. In-Reply-To: <871pjtg91b.ffs@tglx> References: <20260102165308.76290-1-imran.f.khan@oracle.com> <871pjtg91b.ffs@tglx> Date: Tue, 13 Jan 2026 10:24:59 +0100 Message-ID: <87y0m1eufo.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, Jan 13 2026 at 10:24, Thomas Gleixner wrote: > On Sat, Jan 03 2026 at 00:53, Imran Khan wrote: >> + if (affinity_broken && desc->affinity_notify) { >> + kref_get(&desc->affinity_notify->kref); >> + if (!schedule_work(&desc->affinity_notify->work)) { >> + /* Work was already scheduled, drop our extra ref */ >> + kref_put(&desc->affinity_notify->kref, >> + desc->affinity_notify->release); >> + } >> + } > > No, we are not doing random copy&pasta. > > Split out the functionality into a function and use it both here and in > irq_set_affinity_locked(). And while at it you might fix the typos in subject and change log.