Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4257015imm; Mon, 15 Oct 2018 11:36:06 -0700 (PDT) X-Google-Smtp-Source: ACcGV61O9fcm1u4TMu9dZL9iv14xOazN4CtVq1RTZgtgUndBegB2RVUQfbBxk/afYcxP4mvYhst8 X-Received: by 2002:a17:902:20c9:: with SMTP id v9-v6mr18237085plg.156.1539628566014; Mon, 15 Oct 2018 11:36:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539628565; cv=none; d=google.com; s=arc-20160816; b=nDnEzSsigEDGrCRlXNtwpy9oO7S5gozKmhZpdaExMGMZk8G2zSqqGI3jGyqNCmAxpF GJ9cXe8lbZt2qaujBX+NkaE5qqPRZ2O1fX9p586iXz0Dwem8EX/eYI+2tuv2JVu4e0xF ziKtBPnpNz4lufGR7Jl9OhgGbvw5hzzvkbhT1CY8RK+ygcOMhqgH6JRA2OeGvQCAVHBi Nb0XLlDDLvYs9zUWjDv/d/DPpwemp4MFEDSoph+V1QJ08tvRJQQPCKGDNN0QE81WsD84 lqHVuKa2/SvvG/JT7r0FrlI7PbW/syJMMUCfecID2gYl4gvloA5E7MmE1g7I2qPslybf EX2w== 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:dkim-signature; bh=dxoEJdUUEtBkO1U4tPrRe2/pUza6ktePG5zyxmvD+Qc=; b=cOM69rUpxJE567F4PX9HinRYJhSwbC+QJ2F22egPouwA8fFW/dn8nsL68TddtrBSt+ Uu7qFr8eyhR7+8uCeEAvP0WbDXxnkblHikkuez+//343rt+Qetq2qtfxh/OtEsk0fCQe Y1Jdy8N1OVUPkf6r2/+GtV7pWgfMR7XPpAYoChbijswY5go0BYmQbFZ+1lV0sPu8NY32 82Rww8S2A0rkxTO84E70ZQkEs/VwgW0BIakpZEysLfbSYe3OUJD++TdhxoIte3lQTRdP uzK3VkyVDigX8dNEdi5fRD+QVGOvMvKlQvOO8WI/OXyr1hGOY+wa3z1fylzoxDce2ufx BA3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=E5hPACx4; 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 j12-v6si12363553pfd.222.2018.10.15.11.35.50; Mon, 15 Oct 2018 11:36:05 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=E5hPACx4; 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 S1726952AbeJPCV0 (ORCPT + 99 others); Mon, 15 Oct 2018 22:21:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:38494 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726922AbeJPCV0 (ORCPT ); Mon, 15 Oct 2018 22:21:26 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1612220881; Mon, 15 Oct 2018 18:34:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539628500; bh=7YDvBM1nUO7oaMDR1/tNE5L7X2ZWSgDKOXHQ0rMcsRk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E5hPACx4BQPCYLEaVfpUkcKGCer3KmAiORvA/aMAEv7NYDLTpYY9VRGLp1WTsJshj QpD9E+eskHPmtR44sw3dk23NG0k1k8WBqFRsslxzAsbp1w9R0VsfGbUPDVVmIVbxuB S0WF+7nYbtG8WkpwWkWqUe8svjhH7rFNFZSjc2b0= Date: Mon, 15 Oct 2018 20:34:58 +0200 From: Greg KH To: rkir@google.com Cc: linux-kernel@vger.kernel.org, tkjos@google.com Subject: Re: [PATCH v3 06/15] platform: goldfish: pipe: Move memory allocation from probe to init Message-ID: <20181015183458.GA28454@kroah.com> References: <20181003171720.169953-1-rkir@google.com> <20181003171720.169953-6-rkir@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181003171720.169953-6-rkir@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 03, 2018 at 10:17:11AM -0700, rkir@google.com wrote: > From: Roman Kiryanov > > There will be two separate init functions for v1 and v2 > (different driver versions) and they will allocate different > state. You should only allocate memory at probe time, not init time as what happens if the hardware is not present yet your driver is loaded? You should do almost nothing at init time except register with the proper bus so that your probe function can be called if the hardware is present. So the patch here is going backwards from what it should be working toward. thanks, greg k-h