Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4263872rwd; Tue, 23 May 2023 05:40:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6qHD0HA/raJNUA19ApcANThoTe8me0rdWV7v7Q74OFuHvdkv+BapiCnOsQN2sVkm0KOrSO X-Received: by 2002:a05:6a00:cd1:b0:643:b37d:d350 with SMTP id b17-20020a056a000cd100b00643b37dd350mr19480802pfv.31.1684845643915; Tue, 23 May 2023 05:40:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684845643; cv=none; d=google.com; s=arc-20160816; b=AVT0UbzeeQwj2vpuTHdsaLC0+fxAScXZH5GgFbKtNQ9fmAclsX2aNLX3BX3TwKrbqV v0bhcNoRhNHWPMOgUbhzKtgBqZYULeOo9tl8+LYJIGYeznTW1S432FI7npn9ManQxI41 pyWkMiUtXanG0hbDo8jV3cbB1fZtE6Q2Z62dK9J8gMPqvAKsIZEe1WpQw0r7bhFKL5UT uaz9RqyzdmBApwnpLsCEVWT/FZVc8Zb/jT6eoXpp7NLs3vCL2QTNCkZB6cxdyOCD2MMu 7fMcInL6D2kI/b8MW3zbgRHx8L3BQ1Aye4eORRoH1iLHzfJevyLhKzZUqIB68//Rk+xN jMvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :mime-version:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=PSEJhzKvpVyR/pqvYhGYpQKS9kejgYF7JkoWjFXjyTo=; b=FnA2ACrk+KyfNrYCr0q4N1csAIDPJvjqQiZ91LQ4diw6RDmBFgHyx8NpObqSHz36MS sOHCyZ1SwRh1xM3TUpfLnn4yv8YONSAhnuzXoJivj+ofg8cyJy1b7PE5DQcFWcpMpjAC SO8y+tKFo4+CpnUG8fLeKCQ5P0bF+yqpF+ZIU6ZokaIrxyFU8njPV639HHNYKcZSK6j8 aPZPnKur4y/bHFfsk7RMrKEG9Oi8YhIgOZJll/vD95DtNFF8IWDZx5ukQLhEDHkr9IxQ yZOrbXT64Q2EYHg+aTtNdIw2QENJz35J7uxhsPoQTeMpa1niM2XxWK+ZrbxlhQdVnqE/ b1eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="TsVPzu/g"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w12-20020aa79a0c000000b0063b52b9a8f5si6547587pfj.267.2023.05.23.05.40.31; Tue, 23 May 2023 05:40:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="TsVPzu/g"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236829AbjEWMWi (ORCPT + 99 others); Tue, 23 May 2023 08:22:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236669AbjEWMWd (ORCPT ); Tue, 23 May 2023 08:22:33 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42E53DB for ; Tue, 23 May 2023 05:22:29 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230523122226euoutp0284a16b53933e244fc2c3e9fc4cbd7f7c~hxTBO-6mm1935319353euoutp02G for ; Tue, 23 May 2023 12:22:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230523122226euoutp0284a16b53933e244fc2c3e9fc4cbd7f7c~hxTBO-6mm1935319353euoutp02G DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1684844546; bh=PSEJhzKvpVyR/pqvYhGYpQKS9kejgYF7JkoWjFXjyTo=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=TsVPzu/gdpuIbDymwA0yuai6EvAGTVxv9zZCeCtZlweKsNZDXQ5/lO9FJ9Cb58xJa vogW/6zQr8+W3wesETNS2BzT//jkj+zZJJYT0kamB1udzFSYiupuMcLkjkpIEOSiBt pWXzowuq+qvYIm8zQKDZzo3xe/cUHuP6zPyfdzvQ= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20230523122226eucas1p1e18f5acfe5110c795265c93f5efcee4f~hxTA3Iiwz2731327313eucas1p14; Tue, 23 May 2023 12:22:26 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 13.16.11320.200BC646; Tue, 23 May 2023 13:22:26 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230523122226eucas1p2bc0a2c060f01f460a11e90545f9da9aa~hxTAhQ5iA2886828868eucas1p2C; Tue, 23 May 2023 12:22:26 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230523122226eusmtrp25d4fcc81b8357666bf232d27fc9b313a~hxTAgcCMZ0635006350eusmtrp2a; Tue, 23 May 2023 12:22:26 +0000 (GMT) X-AuditID: cbfec7f4-993ff70000022c38-7f-646cb0026184 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 8F.71.14344.100BC646; Tue, 23 May 2023 13:22:26 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230523122225eusmtip1067406525da12eb8ce270bbec5693002~hxTAU8pIc1745417454eusmtip10; Tue, 23 May 2023 12:22:25 +0000 (GMT) Received: from localhost (106.210.248.82) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 23 May 2023 13:22:25 +0100 From: Joel Granados To: CC: Christian Brauner , Kees Cook , Joel Granados , , , Iurii Zaikin , Alexander Viro , Sudip Mukherjee Subject: [PATCH v4 1/8] parport: Move magic number "15" to a define Date: Tue, 23 May 2023 14:22:13 +0200 Message-ID: <20230523122220.1610825-2-j.granados@samsung.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230523122220.1610825-1-j.granados@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [106.210.248.82] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNKsWRmVeSWpSXmKPExsWy7djPc7pMG3JSDB49k7R4ffgTo8WZ7lyL PXtPslhc3jWHzeLGhKeMFgdOT2G2OP/3OKvFsp1+DhwesxsusnjsnHWX3WPBplKPTas62Tw+ b5Lz2PTkLVMAWxSXTUpqTmZZapG+XQJXxoQDR9gKpnBV3H92grWBcTdHFyMHh4SAiUTjW90u Ri4OIYEVjBJrljxjhHC+MEps+z2NrYuRE8j5zChxfTMHiA3ScLflP1TRckaJe58uMcEVHXlX C5HYwijxdsENsASbg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gKpnBV3H92grWBcTdHFyMnh4SAicTdlv+MXYxcHEICSxklrqz/wQSRkJHY +OUqK4QtLPHnWhcbRNFHRokpd+4wQThbGCWebNrJDFLFJqAjcf7NHTBbREBc4sTpzWBjmQW2 M0lM+LuLDSQhLOAssWruYUYQm0VAVeLNqnNgDbwCthLrt+xgg1gnL9F2fTpYDaeAncShZ/vA zhACqml9tYkVol5Q4uTMJywgNjNQffPW2cwQtoTEwRcvmCHmKEms7voDNbNW4vPfZ4wTGEVm IWmfhaR9FpL2BYzMqxhFUkuLc9Nzi430ihNzi0vz0vWS83M3MQLjc9uxn1t2MK589VHvECMT B+MhRgkOZiUR3hPl2SlCvCmJlVWpRfnxRaU5qcWHGE2B/pzILCWanA9MEHkl8YZmBqaGJmaW BqaWZsZK4ryeBR2JQgLpiSWp2ampBalFMH1MHJxSDUzrVZ9nG4eZZJzyus/4p/1PqevT+5E/ fVvupeUfPelg5z533+RXz4/6mO7YfMvn7dtX/9I/fmudvXFPy6QFk1ZIxk2dVzMrVG9P/CKZ +h0hx/S3vTk1xfWGncVzFQMD9S+vjmt/CeLKXLitmcFPMmqnbVPilQ3PY0769Xn4rNGf842D P/Hl3+cqWzfFetZUH3kfveMbS/cxLcPnBRzMs8tcJ2pYzD0msz5rss2lye8Wvj+0pOZBXvOr FI2CJztq1+1atFA19GWaYHTgnI0HTtRe/uu9T7qkYPI0Ab6HAovWp15fJKHCYrRQVWliK9Oq R2wBVrKCB6wSZy6aa/yr6IfwRb3CiVm+657PPHpXvcywTYmlOCPRUIu5qDgRABQ9P3lYAwAA X-CMS-MailID: 20230523122226eucas1p2bc0a2c060f01f460a11e90545f9da9aa X-Msg-Generator: CA X-RootMTR: 20230523122226eucas1p2bc0a2c060f01f460a11e90545f9da9aa X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230523122226eucas1p2bc0a2c060f01f460a11e90545f9da9aa References: <20230523122220.1610825-1-j.granados@samsung.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Put the size of a parport name behind a define so we can use it in other files. This is a preparation patch to be able to use this size in parport/procfs.c. Signed-off-by: Joel Granados Reviewed-by: Luis Chamberlain Signed-off-by: Luis Chamberlain --- drivers/parport/share.c | 2 +- include/linux/parport.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/parport/share.c b/drivers/parport/share.c index 62f8407923d4..2d46b1d4fd69 100644 --- a/drivers/parport/share.c +++ b/drivers/parport/share.c @@ -467,7 +467,7 @@ struct parport *parport_register_port(unsigned long base, int irq, int dma, atomic_set(&tmp->ref_count, 1); INIT_LIST_HEAD(&tmp->full_list); - name = kmalloc(15, GFP_KERNEL); + name = kmalloc(PARPORT_NAME_MAX_LEN, GFP_KERNEL); if (!name) { kfree(tmp); return NULL; diff --git a/include/linux/parport.h b/include/linux/parport.h index a0bc9e0267b7..243c82d7f852 100644 --- a/include/linux/parport.h +++ b/include/linux/parport.h @@ -180,6 +180,8 @@ struct ieee1284_info { struct semaphore irq; }; +#define PARPORT_NAME_MAX_LEN 15 + /* A parallel port */ struct parport { unsigned long base; /* base address */ -- 2.30.2