From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31C0BC43613 for ; Thu, 20 Jun 2019 10:41:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 02A482070B for ; Thu, 20 Jun 2019 10:41:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726318AbfFTKle (ORCPT ); Thu, 20 Jun 2019 06:41:34 -0400 Received: from mga11.intel.com ([192.55.52.93]:42500 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726222AbfFTKle (ORCPT ); Thu, 20 Jun 2019 06:41:34 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2019 03:41:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,396,1557212400"; d="scan'208";a="181837533" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by fmsmga001.fm.intel.com with SMTP; 20 Jun 2019 03:41:29 -0700 Received: by lahna (sSMTP sendmail emulation); Thu, 20 Jun 2019 13:41:28 +0300 Date: Thu, 20 Jun 2019 13:41:28 +0300 From: Mika Westerberg To: Ard Biesheuvel Cc: Jarkko Nikula , linux-spi@vger.kernel.org, Mark Brown , kbuild test robot , Dan Carpenter , Andy Shevchenko , Masahisa Kojima , "Rafael J. Wysocki" , ACPI Devel Maling List , Lukas Wunner Subject: Re: [PATCH] spi/acpi: fix incorrect ACPI parent check Message-ID: <20190620104128.GW2640@lahna.fi.intel.com> References: <20190619095254.19559-1-ard.biesheuvel@linaro.org> <20190619101604.GR2640@lahna.fi.intel.com> <54ede1d8-0e6b-e7d9-5e61-a7d057abbd2b@linux.intel.com> <08e498d6-1ff8-771f-7d4f-6ea5f705d386@linux.intel.com> <20190619144255.GG2640@lahna.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Thu, Jun 20, 2019 at 12:33:41PM +0200, Ard Biesheuvel wrote: > Jarkko, does this help? > > diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c > index 50d230b33c42..d072efdd65ba 100644 > --- a/drivers/spi/spi.c > +++ b/drivers/spi/spi.c > @@ -1914,6 +1914,7 @@ static acpi_status > acpi_register_spi_device(struct spi_controller *ctlr, > return AE_OK; > > lookup.ctlr = ctlr; > + lookup.max_speed_hz = 0; > lookup.mode = 0; > lookup.bits_per_word = 0; > lookup.irq = -1; IMHO it's better to do: memset(&lookup, 0, sizeof(lookup)); lookup.ctlr = ctlr; lookup.irq = -1; this also initializes chip_select and possibly other fields that get added to the lookup structure later.