Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1114419ybl; Fri, 13 Dec 2019 09:47:30 -0800 (PST) X-Google-Smtp-Source: APXvYqybFfcwZXWy0x/9f28Rbexa8oq1xlfwyp5/wyWpYDF2aX7IJRQSNiYg3ViFsN3E7LggR+Eo X-Received: by 2002:a9d:2028:: with SMTP id n37mr16547389ota.127.1576259250323; Fri, 13 Dec 2019 09:47:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576259250; cv=none; d=google.com; s=arc-20160816; b=unnLeBrTuxDCY2vJ8Bo8QYacVGSBzJ1tUZVkkkRrqOhoIEP5gMKC9jIBf2oaBrlyeJ 4D0V+732eRZq8PCh4pIt9PqVknXBknBcWDFMiimS8+CpSfGCN4+Q6diaR68BHbKc6dId XnC7SEFzjvPmQmqc+ie+YcNJpxfK7CXTv7Pbzn48jAU0GD2+gyeYzFlxJUAhuTGe8AmJ Q8lk4Tasg4WR9wIgNij5q9E7s5Rpo8q8gLyqaTpp3NlenOxyo+1iIkfzHVU2KutVLAYU UgkN7EcoSeu2vtVq318SdwtpacuhCP52BSYovu6Z8tEsIBtfCZpaTwjvgLaTseUspzAb xElQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=dtBoagETXVh0V7/P97k4Rqz1E496kHkXGXKVFlW3Xbw=; b=cqUiq0bTzZKgcWNe2QvgS20MW1jCwZRQjnuTPjQBEPigFPjJUIlH5RNj9CXUa25RLy yGlUjVjzyCweCv1zXW6uDHUtNzG5JzBbvLu/3WhDbgbXgXiaBuRf7NEvC3CnUYc1u4IU dmcsmq3Rr8a8yKpR/pSjCkImIlpaUy9PdzHXu/eh6MJsOPIgu1RqwPy7VZl9FMc6FzfE vQhdg2/1cZU9osfDc9oxslkz8vuKlSBmyNU7mCC2Y2DG4z59FrFliR4EZS09gicK1NnV AqsDRjdERITlmLpZ5c6fJYZy2eQF4pPsr8cXn7oGB79X2B+cnqKWPclZfEaxx8bOr4Eh os9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gOIaI7+2; 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=pass (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 o12si5687114otl.243.2019.12.13.09.47.18; Fri, 13 Dec 2019 09:47:30 -0800 (PST) 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=pass header.i=@gmail.com header.s=20161025 header.b=gOIaI7+2; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728544AbfLMRq1 (ORCPT + 99 others); Fri, 13 Dec 2019 12:46:27 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:34291 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728203AbfLMRq1 (ORCPT ); Fri, 13 Dec 2019 12:46:27 -0500 Received: by mail-pg1-f196.google.com with SMTP id r11so176067pgf.1; Fri, 13 Dec 2019 09:46:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=dtBoagETXVh0V7/P97k4Rqz1E496kHkXGXKVFlW3Xbw=; b=gOIaI7+2eAoluHDBShTOls5VEGdzNqNIBmdslR9DmyTjn7b/HUvrlp9zqHJktb8K4H g2GvU2kReI0XtpANkg3fZnYLwn1z5bY+Q6oeI4/PjyJN3MmDz07/pZoPauqN4yKiptJj VYXDf43PfNocaHKVJkYNYh6UAI4qibBIhVIj8m8Mg1aHTtUHBrrpRb3tJpJsUjNQL9tU Xuy3pFkvxLDR1vPfGaFCVD0etxUdGPti5OKb1GcaPbweg99gwql+rHQCWVZ+gMKLu3W2 z50+tlMO7omgHqKjwcZhE3TcWakp2FddFqGhZTUjtKhuc0aXvQ8/CCtz2PUU5wY2Cxt3 X6/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=dtBoagETXVh0V7/P97k4Rqz1E496kHkXGXKVFlW3Xbw=; b=Fyqld53eZTVCWtTEQTLgIHVfKvirlrfp4zSeiShiYcioYZsgmufHCIemVSlPE3EvYo MDV8EytRmgxHAxMtDU1I+X+COji4CApeNMcvhcVW0lo6b4YIhdC6HeB2vPiaSmPvaVCF Tq2sCGVBqDq+e5iIX/aJDSJDWbOErX77c1hqZGHy8B6UljjDn+ofwgm5jHfh66Db4D/E WJk83r+KNB3zuZNrNwBIAzBaFSxAcT68zb5/nGvsTvGVYBmI4EBnFcEigJ+XQmLj9PzJ AajBsJc43WMPlYADxvuN6gTjtKgBOWloQhlsjKW8fZJgqbWMQDFeG3J9rvKP6tWtCmuM 2nNw== X-Gm-Message-State: APjAAAW/0uLEPra3mOlRjSID0XD8QHrnIrv68BVeIl5CJ0V58wmgVT3a yiLEJG1rawhoZiE9EEzex4g= X-Received: by 2002:aa7:8ad9:: with SMTP id b25mr683869pfd.70.1576259186300; Fri, 13 Dec 2019 09:46:26 -0800 (PST) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id f18sm12823124pfk.124.2019.12.13.09.46.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2019 09:46:25 -0800 (PST) Date: Fri, 13 Dec 2019 09:46:23 -0800 From: Dmitry Torokhov To: Felipe Balbi , "Rafael J. Wysocki" Cc: Greg Kroah-Hartman , Hans de Goede , Marek Szyprowski , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] usb: dwc3: use proper initializers for property entries Message-ID: <20191213174623.GA20267@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should not be reaching into property entries and initialize them by hand, but rather use proper initializer macros. This way we can alter internal representation of property entries with no visible changes to their users. Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Dmitry Torokhov --- It would be good if this could go through Rafael's tree as it is needed for the rest of my software_node/property_entry rework patch series which I would love not to delay till 5.6. Thanks! drivers/usb/dwc3/host.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index 5567ed2cddbec..fa252870c926f 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -88,10 +88,10 @@ int dwc3_host_init(struct dwc3 *dwc) memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props)); if (dwc->usb3_lpm_capable) - props[prop_idx++].name = "usb3-lpm-capable"; + props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb3-lpm-capable"); if (dwc->usb2_lpm_disable) - props[prop_idx++].name = "usb2-lpm-disable"; + props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb2-lpm-disable"); /** * WORKAROUND: dwc3 revisions <=3.00a have a limitation @@ -103,7 +103,7 @@ int dwc3_host_init(struct dwc3 *dwc) * This following flag tells XHCI to do just that. */ if (dwc->revision <= DWC3_REVISION_300A) - props[prop_idx++].name = "quirk-broken-port-ped"; + props[prop_idx++] = PROPERTY_ENTRY_BOOL("quirk-broken-port-ped"); if (prop_idx) { ret = platform_device_add_properties(xhci, props); -- 2.24.1.735.g03f4e72817-goog -- Dmitry