Received: by 10.213.65.68 with SMTP id h4csp1549290imn; Thu, 15 Mar 2018 02:57:17 -0700 (PDT) X-Google-Smtp-Source: AG47ELv3VMBDKhMPlLtu+B3i2tRkeQAs+PnHybMWIHM4J7WN+dGO+8kxuJCtGqA6aS7c8uMFt6T9 X-Received: by 10.98.9.134 with SMTP id 6mr4876365pfj.149.1521107837025; Thu, 15 Mar 2018 02:57:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521107836; cv=none; d=google.com; s=arc-20160816; b=qriM8n4tWI4Wsvv9mGV2Gyk8cU2lVGXKel33MGTmM5yx6e8MteHPV+E61dXqJo6SKR 4Ttx0885SC+suU0XRlerxx5OFdaBIIpQIj4Sl/tMjHAlEPHQZrjFzMq62pxUk6S2QJsW 047ljPtbk4V/6TuKhmk35hcgw6dD7j4OlC3saSoJQKq24jV70Miz8n+ge+oW0Eexwx6O LcHpGNE57wXOWD0vVABipxwC7qTdJR6ttzs4gTSX718DbGDloD16MJeTEMNYofnFx2Zi tsifhklBLxotHcwUIBpyhEvH1voBoV+Y+akb9NngOa1SWbAZkZAbxbcB/Z5m0M57Q/Vk uU0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=9K7j7a1dFWc5fSFwiAeQRnvb6Tci4bbC0w5Q2kFcD2A=; b=tqEXHX5+VWSU2emUrObt/dv2fC1VJ94YdzzuhSZ88y0lPRHebbLLfbKCbmZu1PFuoD IiVrtXBaaD2hkREE++ECLT4KShD9GECKjIG25cqAc0B5SPRNqAZaic55E8Zc4nptAGT3 Xfw3xTgUu+pVwE93Nyw0EqZeEkF5ZLUAF6swjEN+fbQIeNxwUEOLL5zqOhoeWeMONYWi vs0gktB98nZyjRCq7+L5e/ucY4SoppNIORKFD+IjuRkD+gGYqxv8BTsRdFy8jjY3SYK3 p2k2hpCuYBKj03fB7DNBNym84CWq2E/6nHvLSep+LjC3CI/TIHb6jbRHVhcH0XAcyoAc nebQ== 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t13si3567996pfa.294.2018.03.15.02.57.02; Thu, 15 Mar 2018 02:57:16 -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; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751905AbeCOJzg (ORCPT + 99 others); Thu, 15 Mar 2018 05:55:36 -0400 Received: from rnd-relay.smtp.broadcom.com ([192.19.229.170]:50408 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751508AbeCOJze (ORCPT ); Thu, 15 Mar 2018 05:55:34 -0400 Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.224.233]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 72DDC30C025; Thu, 15 Mar 2018 02:55:33 -0700 (PDT) Received: from bld-bun-01.bun.broadcom.com (bld-bun-01.bun.broadcom.com [10.176.128.83]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 516BE81EC5; Thu, 15 Mar 2018 02:55:33 -0700 (PDT) Received: by bld-bun-01.bun.broadcom.com (Postfix, from userid 25152) id 42251B002AC; Thu, 15 Mar 2018 10:55:32 +0100 (CET) From: Arend van Spriel To: Greg Kroah-Hartman Cc: LKML , Brian Norris , Arend van Spriel Subject: [PATCH for-4.16 3/3] drivers: base: remove check for callback in coredump_store() Date: Thu, 15 Mar 2018 10:55:25 +0100 Message-Id: <1521107725-25027-4-git-send-email-aspriel@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1521107725-25027-1-git-send-email-aspriel@gmail.com> References: <1521107725-25027-1-git-send-email-aspriel@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The check for the .coredump() callback in coredump_store() is redundant. It is already assured the device driver implements the callback upon creating the coredump sysfs entry. Signed-off-by: Arend van Spriel --- drivers/base/dd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/base/dd.c b/drivers/base/dd.c index de6fd09..c9f5408 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -292,8 +292,7 @@ static ssize_t coredump_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { device_lock(dev); - if (dev->driver->coredump) - dev->driver->coredump(dev); + dev->driver->coredump(dev); device_unlock(dev); return count; -- 1.9.1