Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4270352imm; Mon, 15 Oct 2018 11:50:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV60Aei1mPCznyapwerw3Wdw9zOpDgTfNBUOjBQ+zbY7oitqW7M6Lzf/JPYlb6ahwEWgs0NFa X-Received: by 2002:a63:5ec5:: with SMTP id s188-v6mr17117328pgb.126.1539629454276; Mon, 15 Oct 2018 11:50:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539629454; cv=none; d=google.com; s=arc-20160816; b=vQ1b3a0dT0tJ4Uu75D74FKMrnnRRmxdyADatq6tOlQMgJxYaC1CiBhf8CGLQJJX8Xt ygKYNmKodTnWT9dyzm28JYwS1b90ZohlJyA9UGnW04d4oBXu7hd8aTS2Vcwg0ofYsvPT 6+AeJHVbpPhiD2V7T+lAoJI9+WcO+OALZeGtN/OWIOymkb/VEgjD4OO0Pz0n9TdpMuIC wIy/iaUKdNJzjoPCzzWRUA4NlbHXStEb/ezfADsQ+9yJ3u2RJ0uymg6KgcBaLef89y0b JBcpjkaA1KIwaOEtwaCH5wzsU29oJfGC0R5k6dwxJAyQ1PW2yjfBYzhQolK9+54uvAap aAvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xRvcjnh4JTfyOJjTUNxFpr2FULfnmHqOt/18Y6SXcDg=; b=QNHByeiWxXYQ0708FsP1jJjp+iqUAUJ6G4bR7FAwlIs/rp9e2Pd5jgcV0OSoJmB31O 5XSvvENv1H0pr2SFc8KdyUI+fAqb8bj2IbVPQckammxzB7UqODWh1vQ60ekN2++Rz1wP i2yq4IJ9r0RRsr9crfPgxabvRlUHNFyPPcroEDu71Ml/uYs8afF8klzgN55GHCGFPV3c zw3/gpgnRB7gH0fqglYkeh/SlY/ATprmCECuLKmbneZupBlA44w/6TVsRYyvQiZ+JjAo PjDusfTjAxpGrVTbeJ4OOeH2gm9sKedot/tDR3iXhtY7oXL/uXi2iAJrjaodKp2fXScM lPwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=UU+gt1r7; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h71-v6si4586576pge.174.2018.10.15.11.50.38; Mon, 15 Oct 2018 11:50:54 -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=@google.com header.s=20161025 header.b=UU+gt1r7; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726904AbeJPCfL (ORCPT + 99 others); Mon, 15 Oct 2018 22:35:11 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:42268 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726707AbeJPCfL (ORCPT ); Mon, 15 Oct 2018 22:35:11 -0400 Received: by mail-lj1-f196.google.com with SMTP id y71-v6so18478533lje.9 for ; Mon, 15 Oct 2018 11:48:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xRvcjnh4JTfyOJjTUNxFpr2FULfnmHqOt/18Y6SXcDg=; b=UU+gt1r7eKsHgKHocUsAqseEtyNK9R2PoP3kaUauKB4/uRtarx2Z764JFmgai4FY3l xhjN9/j3tLMlaLqpoqu4pL8vOl93bUpFnAldtxPS6SUTtUNLugdKHj2uOpcojOyBTixO IQT86L5xOSJWvw90OQ6DjJO6AZyVrUkMt6utFfx02LLmEpx7hXz1ws7Ojw7cKcdxiicp uL9OWxaeViTlRm5xfGjF8rA7RPJbkmScate1CyIu+1Q/avZRHTqYedTe5OxaTAutheD/ OSThaDNkTR3EZ6xeyk6xBujHUOn5ve7cIy7jkdydQNitOtcN9ZcjgUu1ItMjx4SxWUiN EMfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xRvcjnh4JTfyOJjTUNxFpr2FULfnmHqOt/18Y6SXcDg=; b=jYiAlLKULxE/ThRP5wfs5vHtM7uPqOV+/lk0RCM4WqlptsK7YcbPlVFk2sd5fBBOFr y+zUYXESlxQXDNHNiIBWR1HN+yVwJm9Wlg/wVD+KCjwPU6fCwzGgiLi6woUMRZXvcTFv rEp6Sdyz2gfFXbxwDpOwuUYApklCpJIPZyvIjVyTCx1+zjOeKaG1iE/8dbhERV4BcH2Y pCBvJK/5D6HoaoEyzhMK3cI+EKGf1c5Vw5aK8xb/Lu79Eky4K/eZTudsUwoqQ1e3Fw45 mTBqYGH795aQ9e80nJ4zm/zXyrk8OqMoahiu9Z2xg55J86q8ybjHqLkB3Jcwx51y0LBD 9Dqw== X-Gm-Message-State: ABuFfogxsgyOsUxCDvxw48LsEyWtGfTeih8vzKmVeKkCsNB980COhDpM 2dHCTvGGjD/hsmnZjBR2FYpFxNIibFKpOrevLxnZ8Kal X-Received: by 2002:a2e:6d0a:: with SMTP id i10-v6mr12746935ljc.14.1539629320760; Mon, 15 Oct 2018 11:48:40 -0700 (PDT) MIME-Version: 1.0 References: <20181003171720.169953-1-rkir@google.com> <20181003171720.169953-6-rkir@google.com> <20181015183458.GA28454@kroah.com> In-Reply-To: <20181015183458.GA28454@kroah.com> From: Roman Kiryanov Date: Mon, 15 Oct 2018 11:48:28 -0700 Message-ID: Subject: Re: [PATCH v3 06/15] platform: goldfish: pipe: Move memory allocation from probe to init To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Todd Kjos Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > You should only allocate memory at probe time probe does not know what memory to allocate. We have several versions of the driver (with different init) and different versions allocate different state. >, not init time as what > happens if the hardware is not present yet your driver is loaded? init will have to rollback what it allocated.