From nobody Mon Dec 15 21:46:53 2025 Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 85BC78488 for ; Wed, 15 Jan 2025 09:03:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736931801; cv=none; b=PHquXma8HzORNCpsmCK/oSCl2MF1CdIAYTOSJhM88PT72S+4tMgaH6HSpKjMP4fe1JIX9hPLc/4zIRWIv9jWBlrI7Jnnq3VeAerP+rom3Jmgi7yW6F8z9ZrpUPFVUN/7yDCQlzJvHA23nloqO0/2N8HAPB2DD2gtKm+B/5M6aqw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736931801; c=relaxed/simple; bh=Lar/jkx7myfhty2oWBStJUq1WxjUH2Qg66OG4TdSeoM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TukJCcw9670+jGGFQI32iNL0OuK32nnP7WnpC3jYPnjinwWLUf9JcWu+/3aaYvRwC8M5K7UjqTtSi9OVrfcpsmWneuI6K9Jvp5nt2kCc8iyPnXfuariUI3RT4QNpgxQ8ixKWpk0X0YKVusNlbaiq3RVpFht0sawuKpWfEAiGxpQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=ucb1LDzD; arc=none smtp.client-ip=91.218.175.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ucb1LDzD" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1736931791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=MTx6eVBRDQH0cIOXGIKWY1mU+eXC0+nsCNkZ+qhfRyU=; b=ucb1LDzDV2WBBXqIeWScSoleF14oDJ8fpSemnlvalIaKNJJsQ8aXlQMCzdwWOQihXJ3E6/ zJEJhqN8heF07AMqu+oFWSQcBAE3rDYmurkrAYvGOHXP38OLQFd5VapLBNXGU8NvKk/q1J 9nxsCXMyEYr0rP0V99Gc6eHmqyJdgsw= From: Thorsten Blum To: Alexander Potapenko , Marco Elver , Dmitry Vyukov , Andrew Morton Cc: Thorsten Blum , Anshuman Khandual , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm/kfence: Use str_write_read() helper in get_access_type() Date: Wed, 15 Jan 2025 10:03:03 +0100 Message-ID: <20250115090303.918192-2-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" Remove hard-coded strings by using the str_write_read() helper function. Suggested-by: Anshuman Khandual Signed-off-by: Thorsten Blum --- mm/kfence/kfence_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/kfence/kfence_test.c b/mm/kfence/kfence_test.c index f65fb182466d..00034e37bc9f 100644 --- a/mm/kfence/kfence_test.c +++ b/mm/kfence/kfence_test.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include =20 @@ -88,7 +89,7 @@ struct expect_report { =20 static const char *get_access_type(const struct expect_report *r) { - return r->is_write ? "write" : "read"; + return str_write_read(r->is_write); } =20 /* Check observed report matches information in @r. */ --=20 2.47.1