From patchwork Fri Nov 2 13:01:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru-Cosmin Gheorghe X-Patchwork-Id: 10665521 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BD18617D4 for ; Fri, 2 Nov 2018 13:01:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADFFE2B5B6 for ; Fri, 2 Nov 2018 13:01:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9909A2B614; Fri, 2 Nov 2018 13:01:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 33E342B5B6 for ; Fri, 2 Nov 2018 13:01:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0D4686E4F3; Fri, 2 Nov 2018 13:01:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60074.outbound.protection.outlook.com [40.107.6.74]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE52D6E4F3 for ; Fri, 2 Nov 2018 13:01:28 +0000 (UTC) Received: from DB6PR0802MB2551.eurprd08.prod.outlook.com (10.172.251.149) by DB6PR0802MB2549.eurprd08.prod.outlook.com (10.172.251.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Fri, 2 Nov 2018 13:01:26 +0000 Received: from DB6PR0802MB2551.eurprd08.prod.outlook.com ([fe80::19ca:93bb:bc0:985a]) by DB6PR0802MB2551.eurprd08.prod.outlook.com ([fe80::19ca:93bb:bc0:985a%7]) with mapi id 15.20.1273.030; Fri, 2 Nov 2018 13:01:25 +0000 From: Alexandru-Cosmin Gheorghe To: "seanpaul@chromium.org" , "airlied@linux.ie" , "dri-devel@lists.freedesktop.org" , "maxime.ripard@bootlin.com" , "maarten.lankhorst@linux.intel.com" , "daniel.vetter@ffwll.ch" , Liviu Dudau , Brian Starkey Subject: [PATCH] drm/selftests: Fix build warning -Wframe-larger-than Thread-Topic: [PATCH] drm/selftests: Fix build warning -Wframe-larger-than Thread-Index: AQHUcqwpLBWMyQQvg0KdmSjxN2BlrQ== Date: Fri, 2 Nov 2018 13:01:25 +0000 Message-ID: <20181102130103.7753-1-alexandru-cosmin.gheorghe@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: LO2P265CA0461.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::17) To DB6PR0802MB2551.eurprd08.prod.outlook.com (2603:10a6:4:a1::21) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [217.140.106.53] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB6PR0802MB2549; 6:GfEkwPhA9OGTv4WOMYcEnfXMKLEC7SpwXfG5Jyy4mCMt6YnqFdv9ZJ2jnAEhWjK3GGuOxp/ls+3A2cmjqBvm17vxe4Kj5k31twF3iBK7rZiGZ0FC+e/hvu/ZsSPK3bPhxs0mAfiQssnKPxeI3EVCqXvMnsogaGfl6Q6mC2z5prSPv829Iqp8uvum6dkXsj6+txsP275Q0pN7I2VRdYQfoTJS95tUMJ0n4PNYnCzUJKImPfuQuaVuaFzF9EZEdzxPNCneTY9LHt+k7bitJ5Ui+587MrNOJkd59b56ZK5kaKphBsLw2OwYsNnyZeDxSayWO+WI7bjtBWx6xYZ078J0E3Rw0J4pntPSftNm8cgdHCxZMukjETwk3pEVebjYSINYhQLYtRC6rxR0NTbEMZQR3Sn898DU1y0UVLwTQyaqCW6j4eLbc4abkjvxdspwVOZTG3HfBHSVzi88LEhkj64GEg==; 5:tNGihrDUyp+d94r4VDGaW0u/HTcBBuma1b6G4xnyonCSWHGEC27WZWIeSBL6KNjlx3vFRa/1U1TpExVahSeAUDnL74DT/sTFOdtC3LQSW6NBGf/KW10sVkwsxRL8x/fyLO++cudjjOMwAWoeLa5LFLOacyKXSR2ufhHV2wOYuQI=; 7:Byt6aSInO1Q7L+iL/Pa56jFcNJ683tNOgpnlJbFafPFjPbn4oq+ilE669gN42j3anJHrDluM4GcYR1Qr+aocne+9OvZmAIrzE7aEHxpcpsu30UG1oVsPM8EHXi64mU1tPYtfhGoxcs91tU0xR3sRZQ== x-ms-office365-filtering-correlation-id: 64e4d60c-7f52-4411-64f7-08d640c34bc7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:DB6PR0802MB2549; x-ms-traffictypediagnostic: DB6PR0802MB2549: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(162533806227266)(180628864354917); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231382)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:DB6PR0802MB2549; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0802MB2549; x-forefront-prvs: 08444C7C87 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(376002)(396003)(366004)(346002)(39860400002)(189003)(199004)(68736007)(256004)(478600001)(97736004)(966005)(386003)(26005)(6506007)(6636002)(6486002)(305945005)(102836004)(7736002)(2616005)(6116002)(1076002)(476003)(52116002)(5660300001)(1857600001)(72206003)(186003)(3846002)(2201001)(2501003)(86362001)(25786009)(486006)(99286004)(2906002)(36756003)(53936002)(6512007)(6306002)(110136005)(105586002)(2900100001)(4326008)(71200400001)(71190400001)(8676002)(6436002)(8936002)(54906003)(14454004)(106356001)(81156014)(316002)(81166006)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0802MB2549; H:DB6PR0802MB2551.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: ADW+2ZjXeODGWUgZeZ2MZNCq8IDfDzA6+QxnbXxnHDXBP6OMo4hCN7GL82MaAvl4A/NgRXCtCXg+uUvny4jYH+Wo34kURdCnGr3Fc3pzHVdCk1j+mUS4P5RTrN0i9SljUf7GM2vJJRAwvjcdh56R0eFqbO8L1bZXpJy2t/MXHYajVjZJspih5aHB6XsINqEEBvARPS65cjBpXM9AqUFYfj+IMbOeZsOF6GbPYN/DpbPuwT8rvV6XeqZl/JvCB4TMxhyDSO9J4OLZOCYHT7QGZzunxp1yrJPRSc7z+hQsNZN9ov2XtDkaCnjwvdimYhBQJR247YNlveOp2mzJdWffbB5A4TpQubEx7qIu0ZXyijQ= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64e4d60c-7f52-4411-64f7-08d640c34bc7 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Nov 2018 13:01:25.7265 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2549 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nd , Alexandru-Cosmin Gheorghe Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP It seems for some random configuration drm_device is bigger than 2048 bytes. The fix is to make the mock objects static variables. Bug reported by 0-DAY Kernel test infrastructure here: https://lists.01.org/pipermail/kbuild-all/2018-November/054431.html Fixes: 6ff3d9ffdcbb ("drm/selftests: Add tests for drm_internal_framebuffer_create") Signed-off-by: Alexandru Gheorghe --- .../gpu/drm/selftests/test-drm_framebuffer.c | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/selftests/test-drm_framebuffer.c b/drivers/gpu/drm/selftests/test-drm_framebuffer.c index 3098435678af..a04d02dacce2 100644 --- a/drivers/gpu/drm/selftests/test-drm_framebuffer.c +++ b/drivers/gpu/drm/selftests/test-drm_framebuffer.c @@ -307,25 +307,27 @@ static struct drm_framebuffer *fb_create_mock(struct drm_device *dev, return ERR_PTR(-EINVAL); } +static struct drm_mode_config_funcs mock_config_funcs = { + .fb_create = fb_create_mock, +}; + +static struct drm_device mock_drm_device = { + .mode_config = { + .min_width = MIN_WIDTH, + .max_width = MAX_WIDTH, + .min_height = MIN_HEIGHT, + .max_height = MAX_HEIGHT, + .allow_fb_modifiers = true, + .funcs = &mock_config_funcs, + }, +}; + static int execute_drm_mode_fb_cmd2(struct drm_mode_fb_cmd2 *r) { int buffer_created = 0; struct drm_framebuffer *fb; - struct drm_mode_config_funcs mock_config_funcs = { - .fb_create = fb_create_mock, - }; - struct drm_device mock_drm_device = { - .mode_config = { - .min_width = MIN_WIDTH, - .max_width = MAX_WIDTH, - .min_height = MIN_HEIGHT, - .max_height = MAX_HEIGHT, - .allow_fb_modifiers = true, - .funcs = &mock_config_funcs, - }, - .dev_private = &buffer_created - }; + mock_drm_device.dev_private = &buffer_created; fb = drm_internal_framebuffer_create(&mock_drm_device, r, NULL); return buffer_created; }