Received: by 10.192.165.156 with SMTP id m28csp577456imm; Wed, 11 Apr 2018 04:07:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx49POWeGwAtkuivcWgTDjrmPs+MfNPzYDGk2I4RcRdlJQs2t97HZzogCbmT12p5bWtFStIQK X-Received: by 10.101.99.8 with SMTP id g8mr3036730pgv.182.1523444870819; Wed, 11 Apr 2018 04:07:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523444870; cv=none; d=google.com; s=arc-20160816; b=By590r2eYSS5LUfc09pSF15q6ZxSlHe/4Fa0LFHHhNQO63I3pvkLZs2zm20szWEdHQ CNC41H4QaEnaR89xlOCfAwbgGhGl0dj5pRo2JW9qeHtupmVPZjqJ2jgtNR2PvOo6MnAT td+vjoh+xlVPKYDwEOSU6YbDhuEIHRLntwsJXEoGWrqVBrpAXASHO2wyI2fZczzfPNd3 lfHgzpCcYty1MpjWiBCRcwJ0WZagkmITLqEk3soEUqGvEOlpSxCkCUWe2gf9fkKZyUja zt7pthDxcQ6bkpG3RUxIw0s6OQ899UREt7IUI9vQCQWdukPuj1OyJlhA7CLV/17O2i2d B7wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature:arc-authentication-results; bh=g7pV/tCORDCuO7TmFXo8BwiJmA4F8C4P3HgkV0Ay12o=; b=EEp3ZLJV7SagAPhyjo+SV5XAPBBXQnlDiVLMzH7Jc533+rO7KHr0HEDr2qgDvKYfn1 ZSR2vedllGeqBklTvE3aWppL25LMJdN33USrkbJotI3NAka/C0Nt8lqrS2FTYpe71A/1 gLDi0IRZAoMzv9fL5YAxPjQyCCgFAaJ9P6gpM2iuxW/1nO8TtmJOuyDM5UMnU8yyOq3h TJyi0ZYAMOKtKp8olVn8TbXDsu+E8OCVekfS/ojoNoQJWqqPWAEuARc86HkV/jBPwa/U 3DMsmxqMdR+xavFE6uDOZAuZtb6827wx9ERvX2CLzkqHD5A98W1oMq/pIBiKesxNt5Kp dV8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@raspberrypi.org header.s=pp header.b=QCGE9oKs; dkim=pass header.i=@raspberrypi-org.20150623.gappssmtp.com header.s=20150623 header.b=nmkNwZQ5; 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 s191si592238pgc.824.2018.04.11.04.07.13; Wed, 11 Apr 2018 04:07:50 -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=fail header.i=@raspberrypi.org header.s=pp header.b=QCGE9oKs; dkim=pass header.i=@raspberrypi-org.20150623.gappssmtp.com header.s=20150623 header.b=nmkNwZQ5; 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 S1753066AbeDKLC4 (ORCPT + 99 others); Wed, 11 Apr 2018 07:02:56 -0400 Received: from mx08-00252a01.pphosted.com ([91.207.212.211]:52782 "EHLO mx08-00252a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753006AbeDKLCy (ORCPT ); Wed, 11 Apr 2018 07:02:54 -0400 Received: from pps.filterd (m0102629.ppops.net [127.0.0.1]) by mx08-00252a01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3BB2qDY009964 for ; Wed, 11 Apr 2018 12:02:52 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org; h=from : to : cc : subject : date : message-id; s=pp; bh=g7pV/tCORDCuO7TmFXo8BwiJmA4F8C4P3HgkV0Ay12o=; b=QCGE9oKs74deYEsFRUS2Hhjiy7lzz7rhHTAKDTb/0nHqSuO/fdskDBqx2ddYVXG/Rh4m ZEwvXVx/af69t+LggiT5iEv8AnchJSDPp8pwFHd5aeNMWBk4fmNZO38uZMP2R2Q1Y4qw wTs3EP/XZxOlrthAV4r4fE82r7ePbFhIyPqeCkL2H4lk0uEB2M9fRGsynDKsr936K0m7 sBDGwVNg66r4pbbSfdCzhcR9khJtWW/C8Do4Jn/kTLAIeA189KuLI3F48CfnlBJaV9jU M/zKfoEvjZ60XBAxpwLNjgscYYoSn89uREUJx6CkDXKwH7gJgb+yFXqhRWXev22x3MXz yA== Received: from mail-wm0-f72.google.com (mail-wm0-f72.google.com [74.125.82.72]) by mx08-00252a01.pphosted.com with ESMTP id 2h6trdt025-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Wed, 11 Apr 2018 12:02:52 +0100 Received: by mail-wm0-f72.google.com with SMTP id e185so934711wmg.5 for ; Wed, 11 Apr 2018 04:02:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=g7pV/tCORDCuO7TmFXo8BwiJmA4F8C4P3HgkV0Ay12o=; b=nmkNwZQ5WfTwi+xAt0w9mC2WTs8vVB2VZCz15BL16Mq2H6T7BEwuTDi+yvJ6bG2Wj7 lOcoFQXssB1w+AHXbiIpbD9cV6TfLLHs/1TBZChn6MwH9aomASHA5b7BXPyZKDwHKrZ4 awNlZtW0rEBYiORLzvzXhzY3YJJA1xb8gINMnoVAVjAHidKJkYddYDi6GczZYozC73y0 HckF4bueCxe28NA2T/yr1xXbBVOYixcCTwfH8TV5rusVxOwKyOHfUhWZU7FEcVFAGExg l+tHiJVyFhThuRZi7aWGRDFL32WaEgKNM43MTZl5ph8uT8ihyN/wj54WsEdv5IPuT/m6 qSTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=g7pV/tCORDCuO7TmFXo8BwiJmA4F8C4P3HgkV0Ay12o=; b=a8vWS9td46R+wev4jUZ0xNFyUItI3OIeLA10SKJVI25w3AMwXtuEaDzU0xHmrP5Kid 9F1Y4+MhhZGIFUfdxU89H29DrpVywaD/0MAZKxGrjR++tlfjcqwnFRUBgb6NvGkt3BXb IhXlxyih3NZj2eoL2fIW5wtV69bATycz8EMXE0wqMTSmyLqs04yrirDnBhphY53rilnD Hi5UaqFHhtz8684rveeRfv/KKa6zkDF+0HN4ATnMJmWkx6EUgDuCQmwRoMaGrIGFxas0 xcOrsVyrDFmmo8Mg7fExdN4rvFDKIFasGbwaxxAwxQZZ7HdrzWueqjDtb6NU2E7zH0vE mYvA== X-Gm-Message-State: ALQs6tDasKlODyJEudeQb02u8upGIfb14PmF1hWKoahwu6Qni9fd9qVH 3iRW1bJ8wWNkr/2of6MG0xpTkHO2N/GjueCFFVb7wm5nXZmVe5u3LD9x5B3IJsIxEuPPyy+JOCB Eg21bz34RAscd0N/ZmKId5mUV X-Received: by 10.223.136.217 with SMTP id g25mr3239429wrg.203.1523444571769; Wed, 11 Apr 2018 04:02:51 -0700 (PDT) X-Received: by 10.223.136.217 with SMTP id g25mr3239422wrg.203.1523444571569; Wed, 11 Apr 2018 04:02:51 -0700 (PDT) Received: from buildbot.pitowers.org ([2a00:2381:fdf7:14:1c94:2800:3cf2:4519]) by smtp.gmail.com with ESMTPSA id b40sm1542516wrb.88.2018.04.11.04.02.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Apr 2018 04:02:51 -0700 (PDT) From: Phil Elwell To: Woojung Huh , Microchip Linux Driver Support , netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Phil Elwell Subject: [PATCH] lan78xx: Avoid spurious kevent 4 "error" Date: Wed, 11 Apr 2018 12:02:47 +0100 Message-Id: <1523444567-128200-1-git-send-email-phil@raspberrypi.org> X-Mailer: git-send-email 2.7.4 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-11_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org lan78xx_defer_event generates an error message whenever the work item is already scheduled. lan78xx_open defers three events - EVENT_STAT_UPDATE, EVENT_DEV_OPEN and EVENT_LINK_RESET. Being aware of the likelihood (or certainty) of an error message, the DEV_OPEN event is added to the set of pending events directly, relying on the subsequent deferral of the EVENT_LINK_RESET call to schedule the work. Take the same precaution with EVENT_STAT_UPDATE to avoid a totally unnecessary error message. Signed-off-by: Phil Elwell --- drivers/net/usb/lan78xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index 32cf217..3102374 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -2507,7 +2507,7 @@ static void lan78xx_init_stats(struct lan78xx_net *dev) dev->stats.rollover_max.eee_tx_lpi_transitions = 0xFFFFFFFF; dev->stats.rollover_max.eee_tx_lpi_time = 0xFFFFFFFF; - lan78xx_defer_kevent(dev, EVENT_STAT_UPDATE); + set_bit(EVENT_STAT_UPDATE, &dev->flags); } static int lan78xx_open(struct net_device *net) -- 2.7.4