Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752739AbbHEMpG (ORCPT ); Wed, 5 Aug 2015 08:45:06 -0400 Received: from mail-yk0-f172.google.com ([209.85.160.172]:35349 "EHLO mail-yk0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752390AbbHEMpD (ORCPT ); Wed, 5 Aug 2015 08:45:03 -0400 MIME-Version: 1.0 X-Originating-IP: [95.23.50.199] In-Reply-To: <1438777455-28009-1-git-send-email-tomeu.vizoso@collabora.com> References: <1438777455-28009-1-git-send-email-tomeu.vizoso@collabora.com> Date: Wed, 5 Aug 2015 14:45:02 +0200 Message-ID: Subject: Re: [PATCH] memory: omap-gpmc: Don't try to save the GPMC context From: Javier Martinez Canillas To: Tomeu Vizoso Cc: Linux Kernel , Roger Quadros , Tony Lindgren , "linux-omap@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1594 Lines: 41 Hello Tomeu, On Wed, Aug 5, 2015 at 2:24 PM, Tomeu Vizoso wrote: > ...if there isn't one already. > I think is better to instead splitting the subject line like this, to change it for something that fits like "memory: omap-gpmc: Don't try to save uninitialized GPMC context" or "memory: omap-gpmc: Fix gpmc_base NULL pointer dereference" > If for some reason the GPMC device hasn't been probed yet, gpmc_base is > going to be NULL. Because there's no context yet to be saved, just turn > these functions into no-ops until that device gets probed. > > Unable to handle kernel NULL pointer dereference at virtual address 00000010 > pgd = c0204000 > [00000010] *pgd=00000000 > Internal error: Oops: 5 [#1] SMP ARM > Modules linked in: Also, I don't know if the kernel backtrace makes the commit message more readable. Maybe instead you can add an explanation of who is calling this function? That this function is called from OMAP2+ CPUidle code that tries to save the state of several IP blocks but omap3_gpmc_{save,restore}_context() assumes that it will be called after the probe() function has initialized gpmc_base and that might not be true? The patch looks good to me though so after these changes feel free to also add my: Reviewed-by: Javier Martinez Canillas Best regards, Javier -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/