All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [pinchartl-media:drm/du/next 14/17] drivers/gpu/drm/bridge/lvds-codec.c:70:31: warning: cast from pointer to integer of different size
Date: Thu, 06 Feb 2020 02:07:04 +0800	[thread overview]
Message-ID: <202002060259.3F1ppAJC%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5049 bytes --]

tree:   git://linuxtv.org/pinchartl/media.git drm/du/next
head:   c43bcd64c7c703ff7196f74cb6bfc67e35b562d9
commit: e94bb2bf88e2e410a5ae9a0fdd161134e6ac59a0 [14/17] drm/bridge: lvds-codec: Add "lvds-decoder" support
config: arm64-randconfig-a001-20200204 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout e94bb2bf88e2e410a5ae9a0fdd161134e6ac59a0
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=arm64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/bridge/lvds-codec.c: In function 'lvds_codec_probe':
>> drivers/gpu/drm/bridge/lvds-codec.c:70:31: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     lvds_codec->connector_type = (u32)of_device_get_match_data(&pdev->dev);
                                  ^
   Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR
   Cyclomatic Complexity 1 include/linux/device.h:dev_get_drvdata
   Cyclomatic Complexity 1 include/linux/device.h:dev_set_drvdata
   Cyclomatic Complexity 1 include/linux/platform_device.h:platform_get_drvdata
   Cyclomatic Complexity 1 include/linux/platform_device.h:platform_set_drvdata
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/lvds-codec.c:lvds_codec_remove
   Cyclomatic Complexity 2 drivers/gpu/drm/bridge/lvds-codec.c:lvds_codec_enable
   Cyclomatic Complexity 2 drivers/gpu/drm/bridge/lvds-codec.c:lvds_codec_disable
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/lvds-codec.c:lvds_codec_attach
   Cyclomatic Complexity 1 include/linux/device.h:devm_kzalloc
   Cyclomatic Complexity 1 include/linux/err.h:IS_ERR
   Cyclomatic Complexity 9 drivers/gpu/drm/bridge/lvds-codec.c:lvds_codec_probe
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/lvds-codec.c:lvds_codec_driver_init
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/lvds-codec.c:lvds_codec_driver_exit
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/lvds-codec.c:_GLOBAL__sub_I_00100_0_lvds_codec.c
   Cyclomatic Complexity 1 drivers/gpu/drm/bridge/lvds-codec.c:_GLOBAL__sub_D_00100_1_lvds_codec.c

vim +70 drivers/gpu/drm/bridge/lvds-codec.c

    56	
    57	static int lvds_codec_probe(struct platform_device *pdev)
    58	{
    59		struct device *dev = &pdev->dev;
    60		struct device_node *port;
    61		struct device_node *endpoint;
    62		struct device_node *panel_node;
    63		struct drm_panel *panel;
    64		struct lvds_codec *lvds_codec;
    65	
    66		lvds_codec = devm_kzalloc(dev, sizeof(*lvds_codec), GFP_KERNEL);
    67		if (!lvds_codec)
    68			return -ENOMEM;
    69	
  > 70		lvds_codec->connector_type = (u32)of_device_get_match_data(&pdev->dev);
    71		lvds_codec->powerdown_gpio = devm_gpiod_get_optional(dev, "powerdown",
    72								     GPIOD_OUT_HIGH);
    73		if (IS_ERR(lvds_codec->powerdown_gpio)) {
    74			int err = PTR_ERR(lvds_codec->powerdown_gpio);
    75	
    76			if (err != -EPROBE_DEFER)
    77				dev_err(dev, "powerdown GPIO failure: %d\n", err);
    78			return err;
    79		}
    80	
    81		/* Locate the panel DT node. */
    82		port = of_graph_get_port_by_id(dev->of_node, 1);
    83		if (!port) {
    84			dev_dbg(dev, "port 1 not found\n");
    85			return -ENXIO;
    86		}
    87	
    88		endpoint = of_get_child_by_name(port, "endpoint");
    89		of_node_put(port);
    90		if (!endpoint) {
    91			dev_dbg(dev, "no endpoint for port 1\n");
    92			return -ENXIO;
    93		}
    94	
    95		panel_node = of_graph_get_remote_port_parent(endpoint);
    96		of_node_put(endpoint);
    97		if (!panel_node) {
    98			dev_dbg(dev, "no remote endpoint for port 1\n");
    99			return -ENXIO;
   100		}
   101	
   102		panel = of_drm_find_panel(panel_node);
   103		of_node_put(panel_node);
   104		if (IS_ERR(panel)) {
   105			dev_dbg(dev, "panel not found, deferring probe\n");
   106			return PTR_ERR(panel);
   107		}
   108	
   109		lvds_codec->panel_bridge =
   110			devm_drm_panel_bridge_add_typed(dev, panel,
   111							lvds_codec->connector_type);
   112		if (IS_ERR(lvds_codec->panel_bridge))
   113			return PTR_ERR(lvds_codec->panel_bridge);
   114	
   115		/*
   116		 * The panel_bridge bridge is attached to the panel's of_node,
   117		 * but we need a bridge attached to our of_node for our user
   118		 * to look up.
   119		 */
   120		lvds_codec->bridge.of_node = dev->of_node;
   121		lvds_codec->bridge.funcs = &funcs;
   122		drm_bridge_add(&lvds_codec->bridge);
   123	
   124		platform_set_drvdata(pdev, lvds_codec);
   125	
   126		return 0;
   127	}
   128	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34333 bytes --]

                 reply	other threads:[~2020-02-05 18:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202002060259.3F1ppAJC%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.