Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp169074lqj; Wed, 10 Apr 2024 07:17:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXqEnN2W2LMi79nGdiRFbbcccfupp0ome4prD7Gn1cQrago3wrs+4V6BSr1HqFXpVKEzyt6WxkMxY54eP5aWG4ZHFbvAZroCA2deNzHcQ== X-Google-Smtp-Source: AGHT+IE2zkln2RlP9wYgF1NO6FUdqF3t7GafcT7w/CFrjuakUCiuyS2hkl5YhkLv/R5delz18xAN X-Received: by 2002:a05:6870:8287:b0:22e:be64:9895 with SMTP id q7-20020a056870828700b0022ebe649895mr2941972oae.46.1712758651322; Wed, 10 Apr 2024 07:17:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712758651; cv=pass; d=google.com; s=arc-20160816; b=utOb3W/vmiP8b9FRVblZYXdETvkqgi1MrBFKB6pHygoVpQ1K8U/VK9tfjFx8sy+TWO nyVOz2ErWQMz9cbra9odJRopZyiZWPAmvH5N+zmba6Ap4XVqR7acEphr4fwDBBRimAmp kZksANRRxlBQKdVnevhkla7Ty9hcOfZZQs8YSer/dTXWB0oWrPq3JfjytS0Xv6wIHn5Z ZU5GuAt8yjtVvNnKFI4Su5r0zs+0Yy317JTEDCRcAhxbRrL1sojQEx4Kr8zbiBRhgCaK lKj0jlfqpI59jTf3QpSucdAtdUwcXzY7wYBfTSVmI658Bz/V1XvW51W37WT1ZHUp2yon UQdg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=rz3Im7L56REBvjfbXu1CTYNuXl9xgNNm6zPeJgLF+RY=; fh=G+kXbXZ7X6Rrw4sqwu0pPJ5LnQ6m545XsQoac6catcE=; b=KiPWw8poUmZI4vjYzi301NNW7auK7OITtogooxaVERJ/YtOqDdJLZFSjKp9qaK+4uT mWef/MckIb9g8cxEioTGbRotMCOzL9EA43EVEVcNlKo/5lTK4n4NuPZAale0WUOIqx3W zO5+xTPpjKb6cDY/xwKyVU8lVDs0pVLjbTqPrIzInRfYflo5uW/q3oZTDwraTurG/0Oi i/IYDMf56YRGgjtBaL5JL77Ea5+vrb340QhXdQxf99kAC3iZf1+T68al+aMt4v7fozGD VFef/a5GDm5xbPM3+nIARqOz740qK6gICHXx18B7NbQj0XX4+uL0PZiA0uZnKnGUkrui 0hWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="ld28G/CH"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-138728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l17-20020a0561023f5100b00475fcdadec3si1708911vsv.654.2024.04.10.07.17.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 07:17:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="ld28G/CH"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-138728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id A5C0E1C276CA for ; Wed, 10 Apr 2024 14:13:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 04FA115EFD6; Wed, 10 Apr 2024 14:11:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ld28G/CH" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (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 709E615ADB0; Wed, 10 Apr 2024 14:11:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712758313; cv=none; b=OyDArCv/3dBUukiEZqN3NJCjyLnFp9b5WHb5K8XMoWA0nVMR49QolhG8f2BiM2/V8D6loQeireDzmOjgFGxgupCT/DqYidb5L4l8S+gUaQGgiBIGrK7+crTPP9ZNOeKd2FhQATCXZQe+YMc8P83z9OwpsCAB0M02FdhsMfKoEao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712758313; c=relaxed/simple; bh=sygr61+yPFLUXgEFhp4qbUoHSiqZR3IMEGHe5hFJJ3c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qluBTmpjCbGG921tM4K6TtqJ/AFe2tI7Nhijvvqz85J9/Xr2/XVudVs26CaLTpHqieuGPRVxx7ybtFH3gOAcb2ZWWIa0cQXqwY1AYW2elQNX2Cq/boIprgWLbWsDHIej7JsaWvOCQAKyR7MNGRXN6qcUH2ODoWR6SwIyS4uXwRo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ld28G/CH; arc=none smtp.client-ip=198.175.65.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712758312; x=1744294312; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=sygr61+yPFLUXgEFhp4qbUoHSiqZR3IMEGHe5hFJJ3c=; b=ld28G/CHqH2NShNdP8Q/MGEkoyUgNUqqXltqnU0Qy4q5D1bK3OzREACK Z9j2iNFqQcNAmFcN2YSJ9s8bPgcqoRL+4JDUqMTzSY0Nz2YGZVWyXmugK 5dctiyJYAnQA+FuINbmhDYQTOo06Zu0C9Mr87486LcY7FL8bAPlKvIvF5 o5n4DR9k177KxkdHbW2w7ts4gWsk65wxKYwUmr6TgacG8BqMIhvb14JEb BY3a4BZE2ns9/Q6c0/fn6PluI1d9XqMVPNK0orS0MWuhIiR7T98PBBe8q FHCEw8ODeRDQdHiT1c6ns6uN2xAGKopdUFBd3ublE15CUhnF3dQZh+gLw g==; X-CSE-ConnectionGUID: 0XFet8XpRv2I7uMQU36g1A== X-CSE-MsgGUID: hKILSHlGQE+QxJYveF9xGA== X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="19548456" X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="19548456" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2024 07:11:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="937095145" X-IronPort-AV: E=Sophos;i="6.07,190,1708416000"; d="scan'208";a="937095145" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 10 Apr 2024 07:11:37 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 8AC8F161; Wed, 10 Apr 2024 17:11:36 +0300 (EEST) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Jiri Slaby Subject: [PATCH v1 1/1] serial: max3100: Convert to_max3100_port() to be static inline Date: Wed, 10 Apr 2024 17:11:35 +0300 Message-ID: <20240410141135.1378948-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit As Jiri rightfully pointed out the current to_max3100_port() macro implementation is fragile in a sense that it expects the variable name to be port, otherwise it blow up the build. Change this to be static inline to prevent bad compilation. Suggested-by: Jiri Slaby Signed-off-by: Andy Shevchenko --- drivers/tty/serial/max3100.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c index 1e6b5763ce3f..07ee001640bb 100644 --- a/drivers/tty/serial/max3100.c +++ b/drivers/tty/serial/max3100.c @@ -111,7 +111,10 @@ struct max3100_port { struct timer_list timer; }; -#define to_max3100_port(port) container_of(port, struct max3100_port, port) +static inline struct max3100_port *to_max3100_port(struct uart_port *port) +{ + return container_of(port, struct max3100_port, port); +} static struct max3100_port *max3100s[MAX_MAX3100]; /* the chips */ static DEFINE_MUTEX(max3100s_lock); /* race on probe */ -- 2.43.0.rc1.1.gbec44491f096