From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8EEDA314B63 for ; Sat, 5 Sep 2026 19:16:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788635810; cv=none; b=jbk1rVBQTdsmJmPOii3ApJbJNuxCtLiWqljKH3hwJuqNU+yxuBDUHJ3S0HzxxVBxw29Ccuj0pCm3PiDgT2TF0flX14Wvysd1PTXyVTcbQ88z5OBFSQjRvdmXmzZZ9gDGjWwG0Ab3dzrqqFdhTFhMj/cUdwNwvsMvPncbu55ptz4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788635810; c=relaxed/simple; bh=MQ70GUo6Al8lXOJcr2PlWC8uCB3dRhogRoP/FLW6/Do=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nl0m2ZPTPAkTyfqLluOx/WUZoeZmMVgBlhvO2NwmLjwmqbAphnqx8EtBfUpmeGUL0jsb8+pzythh9Fsiefses+bY65hVL0inoWZZTazkS0RIAxtmP+p0xUIWOUaiYrPrS6rfK5R5TI8RF0cc6mGgQkMxMTPzS2dxQAztqIw8O3c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dAYAqXsM; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dAYAqXsM" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-2d94c868ea5so22390645ad.3 for ; Sat, 05 Sep 2026 12:16:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788635799; x=1789240599; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=e4Ym2Cy/+2xCx8lotVDxU3Xy1r3ogvpZwKy3EYgHfC4=; b=dAYAqXsM99FLRjTWk+cGDXCYpVPt0DVeTgMeSbsDhbsM4g0rAN8tFEuOAj9jSiFWSx 7f8lgdLwkupWVq5pMVkM+ihpcQCY1HCvnnUvAduJsY2V5RJRW1YI680KlxFTNV8cfEnz e16BEIbgZx7dg5zGqCaLjU4F5FeJZVy+nxBgbGqS1W68wufyfaIRpzG96ruecAh7YeqL 8B2OzYXp5kCQyUjF+pVeRVH5qJV+5f1l3ztNwD1cmmIVdkMIaBDxGkpx2GISB/ozMH/K wAMPrXqZXd17bxUVthwSPefnf1+Lvh9DblqJ9wlBIFCQ9XacKWp+neo0OWle7XEB+ann vpwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788635799; x=1789240599; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=e4Ym2Cy/+2xCx8lotVDxU3Xy1r3ogvpZwKy3EYgHfC4=; b=aTUO+RLeM2zYiNh2JvZcO2DUmhxskSabY4fjf+oOrEtE2lGd+rGYroYb6nnMeP1+mP 6D4e4haiNalHMuG7gyPRUmQNdKD4Y2JzQkVp5EUaNrE1g6dnnwT08U4BN4CUy4yk7YRr Bc/YrlBEZJI12xuFlaIv2+krGsIXQjpaPpitbz2suC8WjQK/pYI5i8TYgsVnqDMORRan gaHoD/jBi4hB//Flw0O1NKlBMY0wlllJqAH8HRT71OE+GVm+nbBTRjXkFVGvnqeqhyLn Dmmp/uPmCLN/HmcUbvzcrWBcFURgwN59pKUvnRMT6nveC9qNpBDisoOpLw9v+QP6qW8u IAEg== X-Forwarded-Encrypted: i=1; AKwUvBwvDS2AeMDFvlAUMZFAnQI9y1y5sTUZA58C6jxdYbruyQw8BAcF3WsHvkTZLaK88Of1qxFMHBbxSJUQqlg=@vger.kernel.org X-Gm-Message-State: AFuF++n65YRQC5QRHoLR7lf4FE+gXHLYxPsHsS0lIPGhP7cjxdNgd9+X 17kQNW5KtBXMquqoQuTEsIWKUNUmkXT5+SCSuhXSEu/JKJqbJFeBqwA= X-Gm-Gg: AYBFou1cmfdt+p7sWDjx00DQGAet6R/D2GqEjdj+6s3KxQGirbqY0pWSjeyGtRrssvY y4CHyIdat2bx+OcujdoGgzpYbIUeHA+2AAo5UkIHx8JVfinWRDn+SgVxTI7UN2H8G+ccERV8b88 D/v7gzyTJOqRbSzWh/qT8n6lz1bIZ7beGqnwm2jcjA4HTifSuGCUvpGoddC3H7o0GuyUY3N+nYb xxdKbH1djjvmjs800l15HiP/SYWa3kAVCZYNnQcUGBcoXa6vF1A7hZgzS/TIWI9QTAzcP4llwoj GDGUzSjDAKtr9zoHcDB4dQGMNgpMiP7sgt4I3X1/Qk47p2PkuOMDpEkrAUIuLuZHIeUIoH2lSqZ PzTLDAwnlQoCzujWo7U6tinaChjwSXfnYDDWHVRW8gEEJHk7kVDpSIxzMD7BFLOBRphEV97WNjp rCcH8BcQz62xteb7PVR0U44YdEsyK5T8SX5nekn9Qdns64Wxu1LkghKT7RSq9dBY7v6GYOCHc6K 6qgYQwmO13O1TQ= X-Received: by 2002:a17:902:ebc3:b0:2db:20fa:9443 with SMTP id d9443c01a7336-2db20fa96d6mr142156685ad.13.1788635798877; Sat, 05 Sep 2026 12:16:38 -0700 (PDT) Received: from ydg-Zenbook-14-UM3406GA ([211.230.25.193]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2db1499dad4sm24859645ad.55.2026.09.05.12.16.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Sep 2026 12:16:38 -0700 (PDT) From: Donggeun Yoo To: Sean Anderson Cc: Marek Szyprowski , Robin Murphy , Steven Rostedt , iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Donggeun Yoo Subject: Re: [PATCH] dma-mapping: don't trace the DMA address when the allocation fails Date: Sun, 6 Sep 2026 04:16:34 +0900 Message-ID: <20260905191634.179897-1-donggeunyoo.kernel@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: <20260905071919.30784-1-donggeunyoo.kernel@gmail.com> <568a4f04-e0db-342a-13a8-886cf6b2a8ab@linux.dev> <20260905172650.158565-1-donggeunyoo.kernel@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On 9/5/26 14:37, Sean Anderson wrote: > Ah, I see what you mean. TBH I would just do something like > > cpu_handle ? *dma_handle : NULL > > to make it clear what we're doing It would have to be 0, dma_handle being a dma_addr_t, and debug_dma_alloc_coherent() reads *dma_handle too -- it drops the value when virt is NULL, but the read is still there -- so the conditional ends up written three times. 68b6dbf1f441 gave dma_alloc_pages() and dma_alloc_noncontiguous() the if/else split rather than a guarded argument, and I kept dma_alloc_attrs() in that shape so that the three read the same way. I don't feel strongly about it. Say the word and I'll respin with the conditional inline.