linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sparse annotation for error types?
@ 2020-12-05 22:32 Jakub Kicinski
  2020-12-05 23:10 ` Linus Torvalds
  2020-12-08 13:28 ` Dan Carpenter
  0 siblings, 2 replies; 6+ messages in thread
From: Jakub Kicinski @ 2020-12-05 22:32 UTC (permalink / raw)
  To: linux-sparse; +Cc: linux-kernel, edwin.peer, Zhang Changzhong

Hi!

Recently we've been getting a steady stream of patches from Changzhong
to fix missing assignment to error variables before jumping to error
cases.

I wonder if for new code it'd make sense to add an annotation for a type
which has to be returned non-zero?

What I have in mind is the following common flow:

int do_a_thing(struct my_obj *obj, int param)
{
	int err;

	err = first_step(obj, 1);
	if (err)
		return err;

	if (some_check(obj)) {
		err = -EINVAL; /* need explicit error set! */
		goto err_undo_1s;
	}

	err = second_step(obj, param);
	if (err)
		goto err_undo_1s;

	err = third_step(obj, 0);
	if (err)
		goto err_undo_2s;

	return 0;

err_undo_2s:
	second_undo(obj);
err_undo_1s:
	first_undo(obj);
	return err;
}


The variable err should never be returned when it's equal to 0.
So if we annotate it, let's say as:

	int __nzret err;

could sparse then warn if we forgot to assign it after
"if (some_check(obj))"? 

Am I the only one who thinks this would be a good idea?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sparse annotation for error types?
  2020-12-05 22:32 sparse annotation for error types? Jakub Kicinski
@ 2020-12-05 23:10 ` Linus Torvalds
  2020-12-06  0:13   ` Luc Van Oostenryck
  2020-12-08 13:28 ` Dan Carpenter
  1 sibling, 1 reply; 6+ messages in thread
From: Linus Torvalds @ 2020-12-05 23:10 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Sparse Mailing-list, Linux Kernel Mailing List, edwin.peer,
	Zhang Changzhong

On Sat, Dec 5, 2020 at 2:34 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> Am I the only one who thinks this would be a good idea?

I don't think it's likely to be very useful, because a very common
pattern is to not have that separate "return 0" in the middle, but
more along the lines of

        err = first_step(obj, 1);
        if (err)
                return err;

        if (some_check(obj)) {
                err = -EINVAL; /* need explicit error set! */
                goto err_undo_1s;
        }

        err = second_step(obj, param);
        if (err)
                goto err_undo_1s;

        err = third_step(obj, 0);

   err_undo_2s:
        second_undo(obj);
   err_undo_1s:
        first_undo(obj);
        return err;

iow, the "undo" parts are often done even for the success cases. This
is particularly true when those first steps are locking-related, and
the code always wants to unlock.

Sparse also doesn't really do any value analysis, so I suspect it
wouldn't be trivial to implement in sparse anyway.

Syntactically, I also think it's wrong to annotate the variable - I
think the place to annotate would be the return statement, and say
"must be negative" there. Kind of similar to having function arguments
annotated as "must not be NULL" (which sparse also doesn't do, but
some other checking tools do, and sparse can at least _parse_
"__nonnull" even if it ends up being ignored).

It's a bit similar to gcc's has a "returns_nonnull" function
attribute, but that one is not "per return", it's a global "this
function cannot return NULL" thing so that callers can then be
optimized and NULL checks removed. So it's very similar to the
"argument is non-null" in that it's for warnings at the *caller*, not
the function itself.

So if we want sparse support for this, I'd suggest something more akin
to a smarter compile-time assert, IOW more like having a

        compile_time_assert(err < 0);
        return err;

and then sparse (or any other checker) could warn when there's a path
that results in "err" not being negative.

Having some kind of smarter compile-time assert could be useful in
general, but as mentioned, sparse doesn't really do value range
propagation right now, so..

Luc, any reactions?

          Linus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sparse annotation for error types?
  2020-12-05 23:10 ` Linus Torvalds
@ 2020-12-06  0:13   ` Luc Van Oostenryck
  0 siblings, 0 replies; 6+ messages in thread
From: Luc Van Oostenryck @ 2020-12-06  0:13 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Jakub Kicinski, Sparse Mailing-list, Linux Kernel Mailing List,
	edwin.peer, Zhang Changzhong

On Sat, Dec 05, 2020 at 03:10:15PM -0800, Linus Torvalds wrote:
> On Sat, Dec 5, 2020 at 2:34 PM Jakub Kicinski <kuba@kernel.org> wrote:
> >
> > Am I the only one who thinks this would be a good idea?
> 
>         err = third_step(obj, 0);
> 
>    err_undo_2s:
>         second_undo(obj);
>    err_undo_1s:
>         first_undo(obj);
>         return err;
> 
> iow, the "undo" parts are often done even for the success cases. This
> is particularly true when those first steps are locking-related, and
> the code always wants to unlock.
> 
> Sparse also doesn't really do any value analysis, so I suspect it
> wouldn't be trivial to implement in sparse anyway.

Yes but ... (see here under).
 
> Having some kind of smarter compile-time assert could be useful in
> general, but as mentioned, sparse doesn't really do value range
> propagation right now, so..
> 
> Luc, any reactions?

I agree but the code Jakub showed is very constrained:
   * only 2 return points
   * one of them being 0, the other is to be checked.
and I think this should be checkable easily, something like:
   * identify the highest point that can't reach the 'return 0'
   * check that the only way to reach this point is via a zero/non-zero
     test of the 'err' variable/returned value (which is a very
     limited kind of value analysis after all).
But sure, these are rather strict constraints but maybe it's
common for net drivers?

Otherwise, yes, it's probably better to annotate the function itself
or the point of interest (via some kind of assertion) than the
variable.

I've not much idea how much this would be useful, though.

-- Luc

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sparse annotation for error types?
  2020-12-05 22:32 sparse annotation for error types? Jakub Kicinski
  2020-12-05 23:10 ` Linus Torvalds
@ 2020-12-08 13:28 ` Dan Carpenter
  2020-12-09  2:53   ` Zhang Changzhong
  2020-12-19 11:55   ` Dan Carpenter
  1 sibling, 2 replies; 6+ messages in thread
From: Dan Carpenter @ 2020-12-08 13:28 UTC (permalink / raw)
  To: Jakub Kicinski, Zhang Changzhong; +Cc: linux-sparse, linux-kernel, edwin.peer

Hi Zhang,

Are you using Coccinelle to detect these bugs?

On Sat, Dec 05, 2020 at 02:32:50PM -0800, Jakub Kicinski wrote:
> Hi!
> 
> Recently we've been getting a steady stream of patches from Changzhong
> to fix missing assignment to error variables before jumping to error
> cases.

I've mucked about with this a little in Smatch trying to work out some
heuristics to use.  I added a warning for a NULL return followed by a
goto.  Then on Friday I added a warning for a _dev_err() print followed
by a goto.  But neither of those rules catches the bug fixed by commit
4de377b65903 ("net: marvell: prestera: Fix error return code in
prestera_port_create()"), where the error was invalid data.

	if (idx >= size)
		goto free_whatever;

I'm going to print a warning if the function ends in a cleanup block
that can only be reached by gotos.  We'll see how that works tomorrow.

static void match_return(struct statement *stmt)
{
        struct sm_state *sm, *tmp;
        sval_t sval;
        char *name;
        bool is_last;

	// Only complain if the function returns a variable
        if (!stmt->ret_value || stmt->ret_value->type != EXPR_SYMBOL)
                return;

	// The function returns an int
        if (cur_func_return_type() != &int_ctype)
                return;

	// It's only reachable via a goto
        if (get_state(my_id, "path", NULL) != &label)
                return;

	// It returns a negative error code
        sm = get_extra_sm_state(stmt->ret_value);
        if (!sm || !estate_rl(sm->state) ||
            !sval_is_negative(rl_min(estate_rl(sm->state))))
                return;

        FOR_EACH_PTR(sm->possible, tmp) {
		// There is at least one path where "ret" is zero
                if (estate_get_single_value(tmp->state, &sval) &&
                    sval.value == 0)
                        goto warn;
        } END_FOR_EACH_PTR(tmp);

        return;
warn:
	// It's the last statement of a function
        is_last = is_last_stmt(stmt);

        name = expr_to_str(stmt->ret_value);
        sm_warning("missing error code '%s' rl='%s' is_last=%d", name, sm->state->name, is_last);
        free_string(name);
}

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sparse annotation for error types?
  2020-12-08 13:28 ` Dan Carpenter
@ 2020-12-09  2:53   ` Zhang Changzhong
  2020-12-19 11:55   ` Dan Carpenter
  1 sibling, 0 replies; 6+ messages in thread
From: Zhang Changzhong @ 2020-12-09  2:53 UTC (permalink / raw)
  To: Dan Carpenter, Jakub Kicinski; +Cc: linux-sparse, linux-kernel, edwin.peer



On 2020/12/8 21:28, Dan Carpenter wrote:
> Hi Zhang,
> 
> Are you using Coccinelle to detect these bugs?

In fact, I'm not familiar with Coccinelle, these bugs are reported by robot.

> 
> On Sat, Dec 05, 2020 at 02:32:50PM -0800, Jakub Kicinski wrote:
>> Hi!
>>
>> Recently we've been getting a steady stream of patches from Changzhong
>> to fix missing assignment to error variables before jumping to error
>> cases.
> 
> I've mucked about with this a little in Smatch trying to work out some
> heuristics to use.  I added a warning for a NULL return followed by a
> goto.  Then on Friday I added a warning for a _dev_err() print followed
> by a goto.  But neither of those rules catches the bug fixed by commit
> 4de377b65903 ("net: marvell: prestera: Fix error return code in
> prestera_port_create()"), where the error was invalid data.
> 
> 	if (idx >= size)
> 		goto free_whatever;
> 
> I'm going to print a warning if the function ends in a cleanup block
> that can only be reached by gotos.  We'll see how that works tomorrow.
> 
> static void match_return(struct statement *stmt)
> {
>         struct sm_state *sm, *tmp;
>         sval_t sval;
>         char *name;
>         bool is_last;
> 
> 	// Only complain if the function returns a variable
>         if (!stmt->ret_value || stmt->ret_value->type != EXPR_SYMBOL)
>                 return;
> 
> 	// The function returns an int
>         if (cur_func_return_type() != &int_ctype)
>                 return;
> 
> 	// It's only reachable via a goto
>         if (get_state(my_id, "path", NULL) != &label)
>                 return;
> 
> 	// It returns a negative error code
>         sm = get_extra_sm_state(stmt->ret_value);
>         if (!sm || !estate_rl(sm->state) ||
>             !sval_is_negative(rl_min(estate_rl(sm->state))))
>                 return;
> 
>         FOR_EACH_PTR(sm->possible, tmp) {
> 		// There is at least one path where "ret" is zero
>                 if (estate_get_single_value(tmp->state, &sval) &&
>                     sval.value == 0)
>                         goto warn;
>         } END_FOR_EACH_PTR(tmp);
> 
>         return;
> warn:
> 	// It's the last statement of a function
>         is_last = is_last_stmt(stmt);
> 
>         name = expr_to_str(stmt->ret_value);
>         sm_warning("missing error code '%s' rl='%s' is_last=%d", name, sm->state->name, is_last);
>         free_string(name);
> }
> 
> regards,
> dan carpenter
> 
> .
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sparse annotation for error types?
  2020-12-08 13:28 ` Dan Carpenter
  2020-12-09  2:53   ` Zhang Changzhong
@ 2020-12-19 11:55   ` Dan Carpenter
  1 sibling, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2020-12-19 11:55 UTC (permalink / raw)
  To: Jakub Kicinski, Zhang Changzhong; +Cc: linux-sparse, linux-kernel, edwin.peer

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

I've pushed my Smatch check for missing error codes.

https://github.com/error27/smatch/commit/be18f90f05b684c12b80b9364b5bbc5dbef922da

I ended up writing a slightly more tricky version of the check because
there were some places that do:

		ret = 0;
		goto out;

And I didn't want to generate a warning for those.  The heuristic is
that if "ret" is up to 3 lines before the goto then it's probably
intentional.  There are still some false positives, especially in fs/
where "ret" is set to zero at the start of the function but it's
inentional.

I considered doing some more checking to say "this is an error path" but
I kind of like it as is.  I have a separate unpublished check for
"this is an error path and there is a goto but the error code is not set"
and I will probably fix that up and publish it as well.  So it will be
two warnings.  :)  Or vs And.

I've also attached the generated warnings from Friday's linux-next if
you want to take a look.

regards,
dan carpenter

[-- Attachment #2: err-list --]
[-- Type: text/plain, Size: 11311 bytes --]

sound/usb/caiaq/input.c:807 snd_usb_caiaq_input_init() warn: missing error code 'ret'
sound/soc/tegra/tegra20_ac97.c:349 tegra20_ac97_platform_probe() warn: missing error code 'ret'
fs/xfs/libxfs/xfs_alloc.c:2523 xfs_alloc_fix_freelist() warn: missing error code 'error'
fs/xfs/xfs_reflink.c:660 xfs_reflink_end_cow_extent() warn: missing error code 'error'
fs/adfs/dir_fplus.c:146 adfs_fplus_read() warn: missing error code 'ret'
fs/f2fs/data.c:2200 f2fs_read_multi_pages() warn: missing error code 'ret'
fs/btrfs/ctree.c:517 tree_mod_log_insert_move() warn: missing error code 'ret'
fs/btrfs/ctree.c:748 tree_mod_log_eb_copy() warn: missing error code 'ret'
fs/btrfs/ctree.c:806 tree_mod_log_free_eb() warn: missing error code 'ret'
fs/ubifs/journal.c:886 ubifs_jnl_write_inode() warn: missing error code 'err'
fs/ubifs/journal.c:1564 ubifs_jnl_truncate() warn: missing error code 'err'
fs/gfs2/ops_fstype.c:711 init_journal() warn: missing error code 'error'
fs/gfs2/ops_fstype.c:914 init_per_node() warn: missing error code 'error'
fs/ext4/inode.c:2599 mpage_prepare_extent_to_map() warn: missing error code 'err'
fs/cachefiles/daemon.c:726 cachefiles_has_space() warn: missing error code 'ret'
fs/jfs/jfs_logmgr.c:1327 lmLogInit() warn: missing error code 'rc'
drivers/hid/usbhid/hid-pidff.c:1297 hid_pidff_init() warn: missing error code 'error'
drivers/nvdimm/btt.c:1233 btt_read_pg() warn: missing error code 'ret'
drivers/phy/cadence/phy-cadence-torrent.c:2301 cdns_torrent_phy_probe() warn: missing error code 'ret'
drivers/phy/ti/phy-j721e-wiz.c:892 wiz_probe() warn: missing error code 'ret'
drivers/spi/spi-pic32.c:637 pic32_spi_dma_prep() warn: missing error code 'ret'
drivers/spi/spi-stm32-qspi.c:418 stm32_qspi_send() warn: missing error code 'err'
drivers/staging/media/omap4iss/iss.c:1240 iss_probe() warn: missing error code 'ret'
drivers/pinctrl/pinctrl-single.c:1214 pcs_parse_bits_in_pinctrl_entry() warn: missing error code 'res'
drivers/iommu/ioasid.c:184 ioasid_register_allocator() warn: missing error code 'ret'
drivers/iommu/arm/arm-smmu/qcom_iommu.c:241 qcom_iommu_init_domain() warn: missing error code 'ret'
drivers/iommu/arm/arm-smmu/arm-smmu.c:637 arm_smmu_init_domain_context() warn: missing error code 'ret'
drivers/nfc/nfcmrvl/usb.c:424 nfcmrvl_resume() warn: missing error code 'err'
drivers/dma/idxd/init.c:69 idxd_setup_interrupts() warn: missing error code 'rc'
drivers/dma/idxd/cdev.c:116 idxd_cdev_open() warn: missing error code 'rc'
drivers/usb/early/xhci-dbc.c:965 xdbc_init() warn: missing error code 'ret'
drivers/usb/gadget/legacy/multi.c:403 multi_bind() warn: missing error code 'status'
drivers/usb/gadget/legacy/hid.c:103 do_config() warn: missing error code 'status'
drivers/usb/gadget/legacy/hid.c:175 hid_bind() warn: missing error code 'status'
drivers/usb/gadget/legacy/ether.c:407 eth_bind() warn: missing error code 'status'
drivers/usb/gadget/legacy/g_ffs.c:399 gfs_bind() warn: missing error code 'ret'
drivers/usb/gadget/legacy/mass_storage.c:179 msg_bind() warn: missing error code 'status'
drivers/usb/gadget/legacy/acm_ms.c:204 acm_ms_bind() warn: missing error code 'status'
drivers/usb/usbip/vhci_hcd.c:767 vhci_urb_enqueue() warn: missing error code 'ret'
drivers/input/touchscreen/elo.c:345 elo_connect() warn: missing error code 'err'
drivers/input/touchscreen/sur40.c:790 sur40_probe() warn: missing error code 'error'
drivers/mtd/nand/raw/nand_base.c:842 nand_setup_interface() warn: missing error code 'ret'
drivers/mtd/nand/raw/diskonchip.c:1428 doc_probe() warn: missing error code 'ret'
drivers/mtd/nand/raw/fsmc_nand.c:1085 fsmc_nand_probe() warn: missing error code 'ret'
drivers/misc/habanalabs/gaudi/gaudi.c:7848 gaudi_internal_cb_pool_init() warn: missing error code 'rc'
drivers/misc/habanalabs/common/device.c:1372 hl_device_init() warn: missing error code 'rc'
drivers/gpu/drm/nouveau/nouveau_backlight.c:276 nouveau_backlight_init() warn: missing error code 'ret'
drivers/gpu/drm/gma500/psb_drv.c:317 psb_driver_load() warn: missing error code 'ret'
drivers/gpu/drm/virtio/virtgpu_kms.c:166 virtio_gpu_init() warn: missing error code 'ret'
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c:478 amdgpu_vmid_alloc_reserved() warn: missing error code 'r'
drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:523 init_pmu_entry_by_type_and_add() warn: missing error code 'ret'
drivers/gpu/drm/i915/gvt/gvt.c:365 intel_gvt_init_device() warn: missing error code 'ret'
drivers/gpu/drm/i915/gt/selftest_lrc.c:2683 create_gang() warn: missing error code 'err'
drivers/ata/libata-pmp.c:980 sata_pmp_eh_recover() warn: missing error code 'rc'
drivers/nvme/host/core.c:659 nvme_configure_directives() warn: missing error code 'ret'
drivers/nvme/host/tcp.c:1952 nvme_tcp_setup_ctrl() warn: missing error code 'ret'
drivers/nvme/host/fc.c:3088 nvme_fc_create_association() warn: missing error code 'ret'
drivers/leds/leds-is31fl32xx.c:388 is31fl32xx_parse_dt() warn: missing error code 'ret'
drivers/scsi/ufs/ufshcd-crypto.c:167 ufshcd_hba_init_crypto_capabilities() warn: missing error code 'err'
drivers/scsi/3w-xxxx.c:2312 tw_probe() warn: missing error code 'retval'
drivers/scsi/mpt3sas/mpt3sas_scsih.c:6877 _scsih_expander_add() warn: missing error code 'rc'
drivers/scsi/qedf/qedf_main.c:3042 qedf_alloc_global_queues() warn: missing error code 'status'
drivers/scsi/pcmcia/fdomain_cs.c:49 fdomain_probe() warn: missing error code 'ret'
drivers/scsi/qedi/qedi_main.c:1661 qedi_alloc_global_queues() warn: missing error code 'status'
drivers/scsi/smartpqi/smartpqi_init.c:1209 pqi_get_raid_map() warn: missing error code 'rc'
drivers/block/rsxx/core.c:872 rsxx_pci_probe() warn: missing error code 'st'
drivers/xen/xenbus/xenbus_comms.c:362 process_writes() warn: missing error code 'err'
drivers/xen/unpopulated-alloc.c:43 fill_list() warn: missing error code 'ret'
drivers/platform/x86/toshiba_acpi.c:2834 toshiba_acpi_setup_keyboard() warn: missing error code 'error'
drivers/visorbus/visorchipset.c:1588 visorchipset_init() warn: missing error code 'err'
drivers/pci/controller/dwc/pcie-kirin.c:216 kirin_pcie_clk_ctrl() warn: missing error code 'ret'
drivers/fpga/machxo2-spi.c:229 machxo2_write_init() warn: missing error code 'ret'
drivers/fpga/machxo2-spi.c:316 machxo2_write_complete() warn: missing error code 'ret'
drivers/infiniband/hw/cxgb4/qp.c:298 create_qp() warn: missing error code 'ret'
drivers/infiniband/hw/hfi1/qsfp.c:741 get_cable_info() warn: missing error code 'ret'
drivers/infiniband/hw/mlx4/qp.c:1103 create_qp_common() warn: missing error code 'err'
drivers/infiniband/hw/mlx5/devx.c:1972 mlx5_ib_handler_MLX5_IB_METHOD_DEVX_SUBSCRIBE_EVENT() warn: missing error code 'err'
drivers/infiniband/core/device.c:709 add_client_context() warn: missing error code 'ret'
drivers/ntb/test/ntb_msi_test.c:373 ntb_msit_probe() warn: missing error code 'ret'
drivers/ntb/test/ntb_perf.c:602 perf_setup_inbuf() warn: missing error code 'ret'
drivers/bluetooth/btusb.c:4788 btusb_resume() warn: missing error code 'err'
drivers/media/platform/meson/ge2d/ge2d.c:991 ge2d_probe() warn: missing error code 'ret'
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:155 sun6i_video_start_streaming() warn: missing error code 'ret'
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:483 sun6i_video_open() warn: missing error code 'ret'
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c:829 c8sectpfe_probe() warn: missing error code 'ret'
drivers/media/platform/davinci/vpbe.c:632 vpbe_initialize() warn: missing error code 'ret'
drivers/media/platform/qcom/camss/camss-video.c:964 msm_video_register() warn: missing error code 'ret'
drivers/iio/dac/ti-dac5571.c:353 dac5571_probe() warn: missing error code 'ret'
drivers/iio/magnetometer/bmc150_magn.c:794 bmc150_magn_data_rdy_trigger_set_state() warn: missing error code 'ret'
drivers/mcb/mcb-parse.c:88 chameleon_parse_gdd() warn: missing error code 'ret'
arch/x86/oprofile/../../../drivers/oprofile/oprof.c:68 oprofile_setup() warn: missing error code 'err'
drivers/net/wireless/ath/ath10k/pci.c:3700 ath10k_pci_probe() warn: missing error code 'ret'
drivers/net/wireless/ath/ath10k/mac.c:4995 ath10k_start() warn: missing error code 'ret'
drivers/net/wireless/ath/ath10k/mac.c:5493 ath10k_add_interface() warn: missing error code 'ret'
drivers/net/wireless/ath/ath6kl/wmi.c:2508 ath6kl_wmi_sync_point() warn: missing error code 'ret'
drivers/net/wireless/rsi/rsi_91x_usb.c:819 rsi_probe() warn: missing error code 'status'
drivers/net/wireless/intel/ipw2x00/ipw2100.c:753 ipw2100_hw_send_command() warn: missing error code 'err'
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:3760 mlxsw_sp_nexthop_group_refresh() warn: missing error code 'err'
drivers/net/ethernet/mellanox/mlx4/main.c:3532 mlx4_load_one() warn: missing error code 'err'
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c:59 mlx5e_tx_reporter_err_cqe_recover() warn: missing error code 'err'
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c:79 mlx5e_rx_reporter_err_icosq_cqe_recover() warn: missing error code 'err'
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c:2567 mlx5_devlink_eswitch_inline_mode_set() warn: missing error code 'err'
drivers/net/ethernet/mellanox/mlx5/core/main.c:1198 mlx5_load_one() warn: missing error code 'err'
drivers/net/ethernet/sfc/falcon/efx.c:2389 ef4_reset_up() warn: missing error code 'rc'
drivers/net/ethernet/sfc/efx_common.c:757 efx_reset_up() warn: missing error code 'rc'
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1228 bnx2x_iov_init_one() warn: missing error code 'err'
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c:2673 bnx2x_nic_load() warn: missing error code 'rc'
drivers/net/ethernet/broadcom/bnx2.c:8253 bnx2_init_board() warn: missing error code 'rc'
drivers/net/ethernet/altera/altera_tse_main.c:1443 altera_tse_probe() warn: missing error code 'ret'
drivers/net/ethernet/netronome/nfp/crypto/tls.c:527 nfp_net_tls_rx_resync_req() warn: missing error code 'err'
drivers/net/ethernet/intel/i40e/i40e_main.c:14644 i40e_init_recovery_mode() warn: missing error code 'err'
drivers/net/ethernet/myricom/myri10ge/myri10ge.c:3818 myri10ge_probe() warn: missing error code 'status'
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c:645 tc_setup_taprio() warn: missing error code 'ret'
drivers/net/ethernet/tehuti/tehuti.c:2047 bdx_probe() warn: missing error code 'err'
drivers/net/ethernet/qlogic/qla3xxx.c:3508 ql_adapter_up() warn: missing error code 'err'
drivers/net/ethernet/qlogic/qed/qed_main.c:1293 qed_slowpath_start() warn: missing error code 'rc'
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:1526 cxgb4_port_mirror_alloc() warn: missing error code 'ret'
drivers/thermal/samsung/exynos_tmu.c:1076 exynos_tmu_probe() warn: missing error code 'ret'
drivers/perf/arm_dmc620_pmu.c:684 dmc620_pmu_device_probe() warn: missing error code 'ret'
drivers/hv/connection.c:233 vmbus_connect() warn: missing error code 'ret'
drivers/acpi/apei/erst.c:1114 erst_init() warn: missing error code 'rc'
drivers/extcon/extcon-axp288.c:228 axp288_handle_chrg_det_event() warn: missing error code 'ret'
samples/vfio-mdev/mdpy-fb.c:135 mdpy_fb_probe() warn: missing error code 'ret'
net/sctp/socket.c:8801 sctp_wait_for_packet() warn: missing error code 'error'
net/core/rtnetlink.c:4848 rtnl_bridge_notify() warn: missing error code 'err'

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-19 11:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-05 22:32 sparse annotation for error types? Jakub Kicinski
2020-12-05 23:10 ` Linus Torvalds
2020-12-06  0:13   ` Luc Van Oostenryck
2020-12-08 13:28 ` Dan Carpenter
2020-12-09  2:53   ` Zhang Changzhong
2020-12-19 11:55   ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).