From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 014F6389E1A for ; Wed, 14 Jan 2026 13:10:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768396227; cv=none; b=UtZR1qd6nBFb8uyYH3TYCi/B7SoiSh+SMX4OzlQoripzECuGmoJOUnsoDpPws4PvRD9PRTaqkwTHkGQwEXmgJ9nSbI3lzBNzlD61IS4WMNMcuSlNL+DSJXv00YnPh/SmnTAh59GjaaL8DZrPkZ0NYA6gsEVKTxoPx8vvTt/0rD8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768396227; c=relaxed/simple; bh=rvKojorBhGiq9oSSjlzSpqngsEZX6K1yHB2mMFTb3RU=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=YB6RuDxlUc8cZmL5rkaQhY+JDupx/Of7dn7q/O9WQQnB2USW6coRFU1im1GP482th1UnR6A644+fRezquU/CNZvfSbo1o5NueWm/FZO/WAVFXla92sTHDfd87IaZ6Ui9TA8vb63HGy8HFxJC2CMVsCXviJp1Qq8WJM6rMxBxMag= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=QSkP++GT; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=Y/QV6as9; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QSkP++GT"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="Y/QV6as9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768396224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GGW7KNWxKx5IGz4tEhfu2+JvNbz5fYr5dGcjHlJSJFs=; b=QSkP++GTaRIEzbEr50HOkb5toNbk2rij0OHxZwyK8TQCIb44n7GhJ2b2tXl5TnwgaOIFvf FsURWHuEr4mq074isH/aRgJ8+inwEPz+Ii3u3SGT8n0gxx6dT/eMvfEnJmc5eDCTT5gN0Y ev6ceSfNgFY4N91hqQFc39GMhtbIYIU= Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-379-73cTWfA0N5-PrziBIakxxw-1; Wed, 14 Jan 2026 08:10:22 -0500 X-MC-Unique: 73cTWfA0N5-PrziBIakxxw-1 X-Mimecast-MFC-AGG-ID: 73cTWfA0N5-PrziBIakxxw_1768396222 Received: by mail-pg1-f200.google.com with SMTP id 41be03b00d2f7-c5859a38213so2208075a12.3 for ; Wed, 14 Jan 2026 05:10:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1768396222; x=1769001022; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=GGW7KNWxKx5IGz4tEhfu2+JvNbz5fYr5dGcjHlJSJFs=; b=Y/QV6as9qodYXUxAfoCahpAxAIUgck+W47qVE3JZ1lXkU8aBzxI9P/gQKcsTmRb9kx z9yVAkMBwjhBIyKpjNue2iEvC4t4zanNTwukjXfNcf+MBFtEn8zpHjeL4x6CXos5+Pho Kwz339iTAbd6ppNVVxyGK3MXdyMGLlgs7t2eOfEIQj8LQtaj1G3U50BDawrSKYNNZ01u ZX7kQK+pFwA8JY2hF4Syok5M725TNdZ8h8efD6CHL/aFe8EYkCH6ozjwqTOAuIJmwgYO Rwm/4eHQZKDQiTJfYMP59/BniiOxqmuYn8vpmKE9TPBKbNf/emL0vBs2voUy8HKIp4KJ WLow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768396222; x=1769001022; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GGW7KNWxKx5IGz4tEhfu2+JvNbz5fYr5dGcjHlJSJFs=; b=PerKaxh41717gWT2wPqutZY31inSHNbjFKpCDuJoqAht3Dl7EFJRTw/oQHxk3hFYUz XNX08WFBL1eYkNZV3DPxOOluKFUvlAAXZhQVOWowThM/hqv1dyHmjINzX2Mod4RtWaic Bcjulll3zg0IjRgyoZG1HwC9yznOFz1TQfqZtZmXRnnHShozRisk9EHb4+y/VHf6ylhM E83vK9E1o3165UGtTHPZNV0VkpoqrSLGYFpjLjc1qnR1SN0TSvmEzi8iCH9p7TTMWirx sEnEKrxo/NJeQYbiLVYSMvF7Evbr0M87FjAzTIpLri9PDHrZ1hkz9txs8jXFwVFRuxxS Gw8A== X-Forwarded-Encrypted: i=1; AJvYcCXDD2P8TTTF9fcOM+SYAPhlSzbx+nNttV3iFbBPOwNfV1gmzAFe2Lgs3TvjVJ2Vpo1I6FmW97nwvUM0BRU=@vger.kernel.org X-Gm-Message-State: AOJu0YxOzBMmvSpi7aO/biUJc8c1c9HlS/qN1ioi6BDjkhNFDVT5HSjo o8Jotmotu8tJZTsbEUDI0atvTkqgSxVj9HCHxygtQEveLT9SmejSnMgKN2q0n4i3Z6NG8vftsdR ph3tjHx/CZPeegmMhqOD9tY8YzoO2wPWPOPj/94Q4ry21CZaFZjBzTmIEp3xmV4Qf4g== X-Gm-Gg: AY/fxX50ZodOx4tbsORnJsx4J4W/loYBogwNItEfHyGwsqKZl84fElT+eUfaWRFYYpq mVqry2FfZPM6M+SH7T2lHYTHeNUzR+lKx1QpRbyX7iYDge890pZXvaVh5C5YESNJAB4QNnlaCaA O2hdbNIbVn1p5rYvQI5YT7jy/WSJRYjP5m1foSd4DvxWXDfbQNOq4RbcDOxpQjxyc/C9sbuJlwd RpEnXxj8wqzeL5J58fKqWEVClIEXTvnKkJb6mpsgZdKU+c0Fu41pi7iK/MvPFssvWBoO5pKAQEu OyLKzs5PjD2goRcK5XTPbqKA1w294YcMDyXiDG+X+zJqHgy1U1T8hwJvjxIM6epxjwoCNw82zwc xUHMiGynJUffH9y+VezdRer3Ip6jm+Wlcydpy X-Received: by 2002:a05:6a20:a10d:b0:342:d58b:561c with SMTP id adf61e73a8af0-38bed0d6f87mr2445885637.27.1768396221622; Wed, 14 Jan 2026 05:10:21 -0800 (PST) X-Received: by 2002:a05:6a20:a10d:b0:342:d58b:561c with SMTP id adf61e73a8af0-38bed0d6f87mr2445863637.27.1768396221204; Wed, 14 Jan 2026 05:10:21 -0800 (PST) Received: from [10.200.68.138] (nat-pool-muc-u.redhat.com. [149.14.88.27]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c4cbfc2f477sm20335a12.8.2026.01.14.05.10.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jan 2026 05:10:20 -0800 (PST) Message-ID: <1e57f54e6738e761ed49cfde8a7423ce141915be.camel@redhat.com> Subject: Re: [PATCH] PCI: Remove useless WARN_ON() from devres From: Philipp Stanner To: Philipp Stanner , Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Guenter Roeck Date: Wed, 14 Jan 2026 14:10:10 +0100 In-Reply-To: <20251218092819.149665-2-phasta@kernel.org> References: <20251218092819.149665-2-phasta@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.4 (3.52.4-2.fc40) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2025-12-18 at 10:28 +0100, Philipp Stanner wrote: > PCI's devres implementation contains a WARN_ON() which served to inform > users relying on the legacy devres iomap table that this table does not > support multiple mappings per BAR. >=20 > The WARN_ON() can be regarded as useless by now, since mapping a BAR > multiple times is legal behavior and old users of pcim_iomap_table(), > the accessor function for that table, did not break in the past PCI > devres cleanup. New PCI users will hopefully notice that > pcim_iomap_table() is deprecated and are unlikely to use it for mapping > the same BAR multiple times. >=20 > Moreover, WARN_ON()s create noisy, difficult to read error messages > which can be more confusing than helpful, since they don't inform the > user about what precisely the problem is. >=20 > Remove the WARN_ON(). >=20 > Reported-by: Guenter Roeck > Signed-off-by: Philipp Stanner *ping* > --- > =C2=A0drivers/pci/devres.c | 3 --- > =C2=A01 file changed, 3 deletions(-) >=20 > diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c > index 9f4190501395..f075e7881c3a 100644 > --- a/drivers/pci/devres.c > +++ b/drivers/pci/devres.c > @@ -469,9 +469,6 @@ static int pcim_add_mapping_to_legacy_table(struct pc= i_dev *pdev, > =C2=A0 if (!legacy_iomap_table) > =C2=A0 return -ENOMEM; > =C2=A0 > - /* The legacy mechanism doesn't allow for duplicate mappings. */ > - WARN_ON(legacy_iomap_table[bar]); > - > =C2=A0 legacy_iomap_table[bar] =3D mapping; > =C2=A0 > =C2=A0 return 0;