Hello Douglas Gilbert, The patch b32ac463cb59: "scsi: sg: NO_DXFER move to/from kernel buffers" from Feb 19, 2021, leads to the following static checker warning: drivers/scsi/sg.c:2990 sg_rq_map_kern() error: uninitialized symbol 'k'. drivers/scsi/sg.c 2972 static int 2973 sg_rq_map_kern(struct sg_request *srp, struct request_queue *q, struct request *rqq, int rw_ind) 2974 { 2975 struct sg_scatter_hold *schp = &srp->sgat_h; 2976 struct bio *bio; 2977 int k, ln; 2978 int op_flags = 0; 2979 int num_sgat = schp->num_sgat; 2980 int dlen = schp->dlen; 2981 int pg_sz = 1 << (PAGE_SHIFT + schp->page_order); 2982 int num_segs = (1 << schp->page_order) * num_sgat; 2983 int res = 0; 2984 2985 SG_LOG(4, srp->parentfp, "%s: dlen=%d, pg_sz=%d\n", __func__, dlen, pg_sz); 2986 if (num_sgat <= 0) 2987 return 0; 2988 if (rw_ind == WRITE) 2989 op_flags = REQ_SYNC | REQ_IDLE; 2990 bio = sg_mk_kern_bio(num_sgat - k); ^ "k" isn't initialized. 2991 if (!bio) 2992 return -ENOMEM; 2993 bio->bi_opf = req_op(rqq) | op_flags; 2994 2995 for (k = 0; k < num_sgat && dlen > 0; ++k, dlen -= ln) { 2996 ln = min_t(int, dlen, pg_sz); 2997 if (bio_add_pc_page(q, bio, schp->pages[k], ln, 0) < ln) { 2998 bio_put(bio); regards, dan carpenter