Return-Path: Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=fb.com (client-ip=67.231.153.30; helo=mx0b-00082601.pphosted.com; envelope-from=prvs=5191125d25=taoren@fb.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=fb.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=fb.com header.i=@fb.com header.b="E8Ro4Wof"; dkim-atps=neutral Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46t4vZ0NXRzDr7Q for ; Wed, 16 Oct 2019 06:18:00 +1100 (AEDT) Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9FJEjeR029477 for ; Tue, 15 Oct 2019 12:17:55 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=facebook; bh=L7QMVFZlOoAPGuSbNI25mehOmJNMBbCJUq1LjA0j/i0=; b=E8Ro4WofPyvf/tLeMSIZspg7Mkr5Lx2SzwzdOaZI6wZS+YAUo1pwRtmX611X8XJ6FaqA 5qWmoeuuNDQMWzmxz1gN/9U/xlU0NxYWkg12UVV21cVtU0hJvVJCV2HNV1MTpc8/uxnm Ou95ns/BjGFhvEh7lXhUmZmr9zf7ciqZTe4= Received: from mail.thefacebook.com (mailout.thefacebook.com [199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2vn1er4qn9-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 15 Oct 2019 12:17:55 -0700 Received: from 2401:db00:2050:5102:face:0:37:0 (2620:10d:c081:10::13) by mail.thefacebook.com (2620:10d:c081:35::125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.1713.5; Tue, 15 Oct 2019 12:17:53 -0700 Received: by devvm1794.vll1.facebook.com (Postfix, from userid 150176) id 26E2B5C979E6; Tue, 15 Oct 2019 12:12:45 -0700 (PDT) Smtp-Origin-Hostprefix: devvm From: Tao Ren Smtp-Origin-Hostname: devvm1794.vll1.facebook.com To: "David S . Miller" , Andrew Lunn , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , Arun Parameswaran , Justin Chen , Russell King , , , CC: Tao Ren Smtp-Origin-Cluster: vll1c12 Subject: [PATCH net-next v9 1/3] net: phy: modify assignment to OR for dev_flags in phy_attach_direct Date: Tue, 15 Oct 2019 12:12:11 -0700 Message-ID: <20191015191213.4028603-2-taoren@fb.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191015191213.4028603-1-taoren@fb.com> References: <20191015191213.4028603-1-taoren@fb.com> X-FB-Internal: Safe MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-15_06:2019-10-15,2019-10-15 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 suspectscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 clxscore=1015 priorityscore=1501 adultscore=0 mlxlogscore=853 impostorscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1908290000 definitions=main-1910150163 X-FB-Internal: deliver X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Oct 2019 19:18:02 -0000 Modify the assignment to OR when dealing with phydev->dev_flags in phy_attach_direct function, and this is to make sure dev_flags set in driver's probe callback won't be lost. Suggested-by: Andrew Lunn CC: Heiner Kallweit CC: Vladimir Oltean Signed-off-by: Tao Ren Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- Changes: - nothing is changed in v1-v8: it's given v9 to align with the version of patch series. drivers/net/phy/phy_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 9d2bbb13293e..9c263caccab4 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -1270,7 +1270,7 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, phydev_err(phydev, "error creating 'phy_standalone' sysfs entry\n"); } - phydev->dev_flags = flags; + phydev->dev_flags |= flags; phydev->interface = interface; -- 2.17.1