Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp6034503imb; Fri, 8 Mar 2019 07:55:20 -0800 (PST) X-Google-Smtp-Source: APXvYqwGUJucfGe6AyYEmuqonH1pGfNMQkPxIihs/ysvIppHQPIOi+MRPmMGyskBLHzHJ8u23hQW X-Received: by 2002:a17:902:24:: with SMTP id 33mr14120360pla.259.1552060520709; Fri, 08 Mar 2019 07:55:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552060520; cv=none; d=google.com; s=arc-20160816; b=giekp25kOEvtDUA7cjIciy6pfv0hI+Nyco4MdPcH2yyCqdLkD6ztqN6sqpIEFVfFKU m2cK8B8G8FTErKARYUnKgz+NMXw2BaMjWngRa8mO694RMs4hBx3JRKucOPiuZMO7mWTp K3QiuzNVw3LQepPfolo8xsp6fsxmXnftXhoa0jYl6V0JyPu+AkRxo9Ibu9hxiZ/LaPYe jIIFT7Ev3OTxkEKWueldpYQ3gPrcm03p+CYybX3P6tm9J4WSDHOEU7sXw1DDpP4ciu5Y tEA+N5fVJX5Z7/seqi2sRmQXOceVnVdIWrWFmmYokt3Pl2+S0ijnWCcSN7jNa17j8D4h WnhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=OwDmWiPnEagw3D+ywSa+CDwmnNCBTA0tBTwYoGkPm2U=; b=iSz9ChAjM9kg5fC17m6IB9CegJyuAfiSOQXAIL3AEBkJ7kgLsXwyMvxOkcuQ7xi8Ro rjvSgXIvbviZLLOAPZ42nnTH+E24STxxx3scYDRqPgsAhLjw99tLY9uWopNjCSBnh8M0 t6vxhc22E0DCBf3aJUNY/fn+ybFAmuBj0wwBmr6Ax63zivEHc8hRgbsRMh7RyWHjeYwn iw8kn7rLKDotdfPKMAPejR8oWyXGUPGw6GRmGxh6KWQ9uRJF+O393aiEPCBcqO7hj1VS qkFIMnmzsfdnWw56a/+DV8sg8WUZmdAKpUl6NLO5Lx8r5K3p+4EZ4fKafCe/ZEG4KuSZ b1cw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b61si7544744plb.27.2019.03.08.07.55.05; Fri, 08 Mar 2019 07:55:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726463AbfCHPxy (ORCPT + 99 others); Fri, 8 Mar 2019 10:53:54 -0500 Received: from mx2.suse.de ([195.135.220.15]:58910 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726254AbfCHPxy (ORCPT ); Fri, 8 Mar 2019 10:53:54 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 35EA8AC24; Fri, 8 Mar 2019 15:53:53 +0000 (UTC) Date: Fri, 8 Mar 2019 16:53:52 +0100 From: Petr Mladek To: Calvin Owens Cc: Sergey Senozhatsky , Steven Rostedt , Greg Kroah-Hartman , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH 3/4] printk: Add consoles to a virtual "console" bus Message-ID: <20190308155352.g43mt44adau6cgh6@pathway.suse.cz> References: <087b13f7812b32cc7c3f9efea71c9bcf324dd031.1551486732.git.calvinowens@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <087b13f7812b32cc7c3f9efea71c9bcf324dd031.1551486732.git.calvinowens@fb.com> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 2019-03-01 16:48:19, Calvin Owens wrote: > This patch embeds a device struct in the console struct, and registers > them on a "console" bus so we can expose attributes in sysfs. > > Early console structures must still be static, since they're required > before we're able to allocate memory. The least ugly way I can come up > with to handle this is an "is_static" flag in the structure which makes > the gets and puts NOPs, and is checked in ->release() to catch mistakes. I wonder if it might get detected by is_kernel_inittext(). Best Regards, Petr