clamp 689 arch/x86/boot/compressed/kaslr.c entry.start = clamp(region->start, start, end); clamp 690 arch/x86/boot/compressed/kaslr.c entry_end = clamp(region_end, start, end); clamp 221 arch/x86/oprofile/op_model_amd.c val = clamp(val, 0x0081ULL, 0xFF80ULL); clamp 1565 block/blk-iocost.c ioc->busy_level = clamp(ioc->busy_level, -1000, 1000); clamp 1598 block/blk-iocost.c vrate = clamp(DIV64_U64_ROUND_UP(vrate * adj_pct, 100), clamp 268 block/kyber-iosched.c depth = clamp(depth, 1U, kyber_depth[sched_domain]); clamp 6530 drivers/ata/libata-core.c host->n_tags = clamp(sht->can_queue, 1, ATA_MAX_QUEUE); clamp 253 drivers/clk/at91/clk-audio-pll.c req->rate = clamp(req->rate, AUDIO_PLL_FOUT_MIN, AUDIO_PLL_FOUT_MAX); clamp 561 drivers/clk/bcm/clk-bcm2835.c rate = clamp(rate, data->min_rate, data->max_rate); clamp 153 drivers/clk/bcm/clk-raspberrypi.c final_rate = clamp(req->rate, rpi->min_rate, rpi->max_rate); clamp 46 drivers/clk/meson/sclk-div.c return clamp(div, 2, maxdiv); clamp 602 drivers/clk/qcom/clk-alpha-pll.c return clamp(rate, min_freq, max_freq); clamp 878 drivers/clk/qcom/clk-alpha-pll.c return clamp(rate, min_freq, max_freq); clamp 135 drivers/clk/qcom/clk-hfpll.c rate = clamp(rate, hd->min_rate, hd->max_rate); clamp 79 drivers/clk/renesas/clk-rcar-gen2.c mult = clamp(mult, 1U, 32U); clamp 93 drivers/clk/renesas/clk-rcar-gen2.c mult = clamp(mult, 1U, 32U); clamp 76 drivers/clk/renesas/rcar-gen2-cpg.c mult = clamp(mult, 1U, 32U); clamp 90 drivers/clk/renesas/rcar-gen2-cpg.c mult = clamp(mult, 1U, 32U); clamp 126 drivers/clk/renesas/rcar-gen3-cpg.c mult = clamp(mult, 1U, 32U); clamp 140 drivers/clk/renesas/rcar-gen3-cpg.c mult = clamp(mult, 1U, 32U); clamp 887 drivers/clk/tegra/clk-dfll.c force_val = clamp(force_val, FORCE_MIN, FORCE_MAX); clamp 74 drivers/clk/tegra/cvb.c dfll_mv = clamp(dfll_mv, min_mv, max_mv); clamp 78 drivers/cpufreq/amd_freq_sensitivity.c clamp(sensitivity, 0, POWERSAVE_BIAS_MAX); clamp 1219 drivers/crypto/picoxcell_crypto.c thresh = clamp(thresh, 1UL, engine->fifo_sz - 1); clamp 143 drivers/extcon/extcon-arizona.c bool clamp) clamp 159 drivers/extcon/extcon-arizona.c if (clamp) { clamp 177 drivers/extcon/extcon-arizona.c if (clamp) clamp 184 drivers/extcon/extcon-arizona.c arizona->hpdet_clamp = clamp; clamp 187 drivers/extcon/extcon-arizona.c if (clamp) { clamp 213 drivers/extcon/extcon-arizona.c if (!clamp) { clamp 1078 drivers/firewire/core-transaction.c cycles = clamp(cycles, 800u, 3u * 8000u); clamp 481 drivers/firewire/net.c max_rec = clamp(max_rec, 8U, 11U); /* 512...4096 */ clamp 920 drivers/gpu/drm/drm_dp_helper.c dp_aux_i2c_transfer_size = clamp(dp_aux_i2c_transfer_size, 1, DP_AUX_MAX_PAYLOAD_BYTES); clamp 486 drivers/gpu/drm/gma500/tc35876x-dsi-lvds.c level = clamp(level, 0, MDFLD_DSI_BRIGHTNESS_MAX_LEVEL); clamp 158 drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c f = clamp(DIV_ROUND_CLOSEST(fxp, 1 << pn), 1, 255); clamp 472 drivers/gpu/drm/i915/display/intel_panel.c source_val = clamp(source_val, source_min, source_max); clamp 502 drivers/gpu/drm/i915/display/intel_panel.c hw_level = clamp(hw_level, panel->backlight.min, panel->backlight.max); clamp 1607 drivers/gpu/drm/i915/display/intel_panel.c panel->backlight.level = clamp(val, panel->backlight.min, clamp 1645 drivers/gpu/drm/i915/display/intel_panel.c panel->backlight.level = clamp(val, panel->backlight.min, clamp 1686 drivers/gpu/drm/i915/display/intel_panel.c panel->backlight.level = clamp(val, panel->backlight.min, clamp 1720 drivers/gpu/drm/i915/display/intel_panel.c panel->backlight.level = clamp(val, panel->backlight.min, clamp 1753 drivers/gpu/drm/i915/display/intel_panel.c panel->backlight.level = clamp(val, panel->backlight.min, clamp 1793 drivers/gpu/drm/i915/display/intel_panel.c panel->backlight.level = clamp(val, panel->backlight.min, clamp 1831 drivers/gpu/drm/i915/display/intel_panel.c panel->backlight.level = clamp(val, panel->backlight.min, clamp 6839 drivers/gpu/drm/i915/intel_pm.c clamp(freq, clamp 85 drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv30.c x |= (0x80 | clamp(m, 0, 0x1f)) << (8 * j); clamp 191 drivers/gpu/drm/rcar-du/rcar_du_crtc.c div = clamp(DIV_ROUND_CLOSEST(rate, target), 1UL, 64UL) - 1; clamp 556 drivers/gpu/drm/rcar-du/rcar_lvds.c adjusted_mode->clock = clamp(adjusted_mode->clock, min_freq, 148500); clamp 1080 drivers/gpu/drm/stm/ltdc.c ldev->caps.nb_layers = clamp((int)lcr, 1, LTDC_MAX_LAYER); clamp 368 drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c u16 start = clamp(mode->vtotal - mode->vdisplay - 10, 8, 100); clamp 432 drivers/gpu/ipu-v3/ipu-di.c div = clamp(div, 1U, 255U); clamp 449 drivers/gpu/ipu-v3/ipu-di.c div = clamp(div, 1U, 255U); clamp 472 drivers/gpu/ipu-v3/ipu-di.c div = clamp(div, 1U, 255U); clamp 1923 drivers/gpu/ipu-v3/ipu-image-convert.c x = clamp(x, (min + ~mask) & mask, max & mask); clamp 47 drivers/hid/hid-elecom.c nbuttons = clamp(nbuttons, 0, MOUSE_BUTTONS_MAX); clamp 1365 drivers/hid/hid-input.c value = clamp(value, clamp 2069 drivers/hid/hid-logitech-hidpp.c range = clamp(range, 180, 900); clamp 92 drivers/hid/hid-udraw-ps3.c axis = clamp(axis, clamp 233 drivers/hid/hid-udraw-ps3.c level = clamp(data[13] - PRESSURE_OFFSET, clamp 429 drivers/i2c/busses/i2c-ocores.c prescale = clamp(prescale, 0, 0xffff); clamp 619 drivers/i2c/busses/i2c-omap.c omap->threshold = clamp(size, (u8) 1, omap->fifo_size); clamp 180 drivers/iio/adc/ingenic-adc.c div_main = clamp(div_main, 1u, 64u); clamp 319 drivers/iio/adc/meson_saradc.c return clamp(tmp, 0, (1 << priv->param->resolution) - 1); clamp 415 drivers/iio/chemical/bme680_core.c calc_hum = clamp(calc_hum, 0, 100000); /* clamp between 0-100 %rH */ clamp 699 drivers/iio/frequency/ad9523.c tmp = clamp(tmp, 1, 1024); clamp 706 drivers/iio/frequency/ad9523.c tmp = clamp(tmp, 0, 63); clamp 306 drivers/iio/frequency/adf4371.c cp_bleed = clamp(cp_bleed, 1U, 255U); clamp 2043 drivers/input/input.c mt_slots = clamp(mt_slots, 2, 32); clamp 86 drivers/input/joydev.c return clamp(value, -32767, 32767); clamp 135 drivers/input/mouse/focaltech.c clamped_x = clamp(finger->x, 0U, priv->x_max); clamp 136 drivers/input/mouse/focaltech.c clamped_y = clamp(finger->y, 0U, priv->y_max); clamp 182 drivers/input/mousedev.c value = clamp(value, min, max); clamp 196 drivers/input/mousedev.c value = clamp(value, min, max); clamp 756 drivers/input/touchscreen/sur40.c SUR40_BRIGHTNESS_MIN, SUR40_BRIGHTNESS_MAX, 1, clamp(brightness, clamp 760 drivers/input/touchscreen/sur40.c SUR40_CONTRAST_MIN, SUR40_CONTRAST_MAX, 1, clamp(contrast, clamp 764 drivers/input/touchscreen/sur40.c SUR40_GAIN_MIN, SUR40_GAIN_MAX, 1, clamp(gain, clamp 335 drivers/leds/led-class-flash.c v = clamp(v, s->min, s->max); clamp 215 drivers/leds/leds-lm3533.c t = clamp(t, LM3533_LED_DELAY3_TMIN, LM3533_LED_DELAY3_TMAX); clamp 221 drivers/leds/leds-lm3533.c t = clamp(t, LM3533_LED_DELAY2_TMIN, LM3533_LED_DELAY2_TMAX); clamp 227 drivers/leds/leds-lm3533.c t = clamp(t, LM3533_LED_DELAY1_TMIN, LM3533_LED_DELAY1_TMAX); clamp 68 drivers/macintosh/windfarm_cpufreq_clamp.c struct wf_control *clamp; clamp 99 drivers/macintosh/windfarm_cpufreq_clamp.c clamp = kmalloc(sizeof(struct wf_control), GFP_KERNEL); clamp 100 drivers/macintosh/windfarm_cpufreq_clamp.c if (clamp == NULL) { clamp 105 drivers/macintosh/windfarm_cpufreq_clamp.c clamp->ops = &clamp_ops; clamp 106 drivers/macintosh/windfarm_cpufreq_clamp.c clamp->name = "cpufreq-clamp"; clamp 107 drivers/macintosh/windfarm_cpufreq_clamp.c ret = wf_register_control(clamp); clamp 111 drivers/macintosh/windfarm_cpufreq_clamp.c clamp_control = clamp; clamp 115 drivers/macintosh/windfarm_cpufreq_clamp.c kfree(clamp); clamp 1234 drivers/media/common/v4l2-tpg/v4l2-tpg-colors.c int clamp = 1; clamp 1270 drivers/media/common/v4l2-tpg/v4l2-tpg-colors.c if (clamp) { clamp 539 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c v = clamp(v, 0, 0xff0); clamp 545 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c v = clamp(v, 0, 0xff0); clamp 731 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c *r = clamp(*r >> 12, 0, 0xff0); clamp 732 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c *g = clamp(*g >> 12, 0, 0xff0); clamp 733 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c *b = clamp(*b >> 12, 0, 0xff0); clamp 919 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c r = clamp(r, 16 << 4, 235 << 4); clamp 920 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c g = clamp(g, 16 << 4, 235 << 4); clamp 921 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c b = clamp(b, 16 << 4, 235 << 4); clamp 985 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c y = clamp(y, 16, 235); clamp 986 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c cb = clamp(cb, 16, 240); clamp 987 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c cr = clamp(cr, 16, 240); clamp 989 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c y = clamp(y, 1, 254); clamp 990 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c cb = clamp(cb, 1, 254); clamp 991 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c cr = clamp(cr, 1, 254); clamp 626 drivers/media/dvb-frontends/af9013.c utmp1 = clamp(stmp1 + 90000, 0, 60000); clamp 672 drivers/media/dvb-frontends/af9013.c utmp1 = clamp(utmp1, 653799U, 1689999U); clamp 683 drivers/media/dvb-frontends/af9013.c utmp1 = clamp(utmp1, 371105U, 827999U); clamp 694 drivers/media/dvb-frontends/af9013.c utmp1 = clamp(utmp1, 193246U, 424999U); clamp 730 drivers/media/dvb-frontends/af9033.c utmp1 = clamp(utmp1, 653799U, 1689999U); clamp 741 drivers/media/dvb-frontends/af9033.c utmp1 = clamp(utmp1, 371105U, 827999U); clamp 752 drivers/media/dvb-frontends/af9033.c utmp1 = clamp(utmp1, 193246U, 424999U); clamp 593 drivers/media/dvb-frontends/cxd2880/cxd2880_top.c level = clamp(level, -840, -240); clamp 184 drivers/media/dvb-frontends/si2168.c utmp = clamp(8 - cmd.args[1], 0, 8); clamp 518 drivers/media/dvb-frontends/tda10071.c uitmp = clamp(uitmp, 181U, 236U); /* -75dBm - -20dBm */ clamp 275 drivers/media/dvb-frontends/ts2020.c f3db = clamp(f3db, 7000U, 40000U); clamp 1809 drivers/media/i2c/cx25840/cx25840-core.c fmt->width = clamp(fmt->width, (h_src + 15) / 16, h_src); clamp 1812 drivers/media/i2c/cx25840/cx25840-core.c fmt->height = clamp(fmt->height, (u32)1, v_src - v_add); clamp 1814 drivers/media/i2c/cx25840/cx25840-core.c fmt->height = clamp(fmt->height, (v_src - v_add * 8 + 7) / 8, clamp 1448 drivers/media/i2c/imx274.c reg_val = clamp(reg_val, (u8)0, (u8)3); clamp 1107 drivers/media/i2c/max2175.c freq = clamp(vf->frequency, ctx->bands_rf->rangelow, clamp 451 drivers/media/i2c/mt9m032.c rect.left = clamp(ALIGN(sel->r.left, 2), MT9M032_COLUMN_START_MIN, clamp 453 drivers/media/i2c/mt9m032.c rect.top = clamp(ALIGN(sel->r.top, 2), MT9M032_ROW_START_MIN, clamp 475 drivers/media/i2c/mt9m111.c rect.left = clamp(rect.left, MT9M111_MIN_DARK_COLS, clamp 478 drivers/media/i2c/mt9m111.c rect.top = clamp(rect.top, MT9M111_MIN_DARK_ROWS, clamp 609 drivers/media/i2c/mt9p031.c rect.left = clamp(ALIGN(sel->r.left, 2), MT9P031_COLUMN_START_MIN, clamp 611 drivers/media/i2c/mt9p031.c rect.top = clamp(ALIGN(sel->r.top, 2), MT9P031_ROW_START_MIN, clamp 440 drivers/media/i2c/mt9t001.c rect.left = clamp(ALIGN(sel->r.left, 2), clamp 443 drivers/media/i2c/mt9t001.c rect.top = clamp(ALIGN(sel->r.top, 2), clamp 510 drivers/media/i2c/mt9v032.c width = clamp(ALIGN(format->format.width, 2), clamp 514 drivers/media/i2c/mt9v032.c height = clamp(ALIGN(format->format.height, 2), clamp 566 drivers/media/i2c/mt9v032.c rect.left = clamp(ALIGN(sel->r.left + 1, 2) - 1, clamp 569 drivers/media/i2c/mt9v032.c rect.top = clamp(ALIGN(sel->r.top + 1, 2) - 1, clamp 1822 drivers/media/i2c/smiapp/smiapp-core.c clamp(fmt->format.width, clamp 1826 drivers/media/i2c/smiapp/smiapp-core.c clamp(fmt->format.height, clamp 1967 drivers/media/i2c/smiapp/smiapp-core.c a = clamp(a, sensor->limits[SMIAPP_LIMIT_SCALER_M_MIN], clamp 1969 drivers/media/i2c/smiapp/smiapp-core.c b = clamp(b, sensor->limits[SMIAPP_LIMIT_SCALER_M_MIN], clamp 1971 drivers/media/i2c/smiapp/smiapp-core.c max_m = clamp(max_m, sensor->limits[SMIAPP_LIMIT_SCALER_M_MIN], clamp 1030 drivers/media/i2c/tvp5150.c rect.left = clamp(rect.left, 0, TVP5150_MAX_CROP_LEFT); clamp 1031 drivers/media/i2c/tvp5150.c rect.top = clamp(rect.top, 0, TVP5150_MAX_CROP_TOP); clamp 2017 drivers/media/pci/bt8xx/bttv-driver.c *width = clamp(*width, min_width, max_width); clamp 2018 drivers/media/pci/bt8xx/bttv-driver.c *height = clamp(*height, min_height, max_height); clamp 271 drivers/media/pci/bt8xx/bttv-vbi.c start = clamp(f->start[i], min_start, max_start); clamp 275 drivers/media/pci/bt8xx/bttv-vbi.c f->count[i] = clamp(count, (s64) 1, clamp 857 drivers/media/pci/ivtv/ivtv-ioctl.c sel->r.width = clamp(sel->r.width, 16U, r.width); clamp 858 drivers/media/pci/ivtv/ivtv-ioctl.c sel->r.height = clamp(sel->r.height, 16U, r.height); clamp 377 drivers/media/pci/saa7164/saa7164-encoder.c port->freq = clamp(f->frequency, clamp 575 drivers/media/platform/atmel/atmel-isi.c pixfmt->width = clamp(pixfmt->width, 0U, MAX_SUPPORT_WIDTH); clamp 576 drivers/media/platform/atmel/atmel-isi.c pixfmt->height = clamp(pixfmt->height, 0U, MAX_SUPPORT_HEIGHT); clamp 516 drivers/media/platform/coda/coda-common.c return round_up(clamp(sizeimage, width * height / 8, clamp 973 drivers/media/platform/coda/coda-common.c s->r.width = clamp(s->r.width, 2U, q_data->width); clamp 974 drivers/media/platform/coda/coda-common.c s->r.height = clamp(s->r.height, 2U, q_data->height); clamp 818 drivers/media/platform/davinci/vpfe_capture.c pixfmt->width = clamp((pixfmt->width), min_width, max_width); clamp 819 drivers/media/platform/davinci/vpfe_capture.c pixfmt->height = clamp((pixfmt->height), min_height, max_height); clamp 666 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c pix_fmt_mp->height = clamp(pix_fmt_mp->height, clamp 669 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c pix_fmt_mp->width = clamp(pix_fmt_mp->width, clamp 300 drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c pix_fmt_mp->height = clamp(pix_fmt_mp->height, clamp 303 drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c pix_fmt_mp->width = clamp(pix_fmt_mp->width, clamp 511 drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c pix_fmt_mp->height = clamp(pix_fmt_mp->height, clamp 514 drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c pix_fmt_mp->width = clamp(pix_fmt_mp->width, clamp 128 drivers/media/platform/omap/omap_vout.c pix->height = clamp(pix->height, (u32)VID_MIN_HEIGHT, clamp 130 drivers/media/platform/omap/omap_vout.c pix->width = clamp(pix->width, (u32)VID_MIN_WIDTH, (u32)VID_MAX_WIDTH); clamp 536 drivers/media/platform/omap3isp/ispccdc.c u32 clamp; clamp 539 drivers/media/platform/omap3isp/ispccdc.c clamp = ccdc->clamp.obgain << ISPCCDC_CLAMP_OBGAIN_SHIFT; clamp 540 drivers/media/platform/omap3isp/ispccdc.c clamp |= ccdc->clamp.oblen << ISPCCDC_CLAMP_OBSLEN_SHIFT; clamp 541 drivers/media/platform/omap3isp/ispccdc.c clamp |= ccdc->clamp.oblines << ISPCCDC_CLAMP_OBSLN_SHIFT; clamp 542 drivers/media/platform/omap3isp/ispccdc.c clamp |= ccdc->clamp.obstpixel << ISPCCDC_CLAMP_OBST_SHIFT; clamp 543 drivers/media/platform/omap3isp/ispccdc.c isp_reg_writel(isp, clamp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CLAMP); clamp 545 drivers/media/platform/omap3isp/ispccdc.c isp_reg_writel(isp, ccdc->clamp.dcsubval, clamp 684 drivers/media/platform/omap3isp/ispccdc.c if (copy_from_user(&ccdc->clamp, ccdc_struct->bclamp, clamp 685 drivers/media/platform/omap3isp/ispccdc.c sizeof(ccdc->clamp))) { clamp 858 drivers/media/platform/omap3isp/ispccdc.c div = clamp(div, 2U, max_div); clamp 2700 drivers/media/platform/omap3isp/ispccdc.c ccdc->clamp.oblen = 0; clamp 2701 drivers/media/platform/omap3isp/ispccdc.c ccdc->clamp.dcsubval = 0; clamp 142 drivers/media/platform/omap3isp/ispccdc.h struct omap3isp_ccdc_bclamp clamp; clamp 803 drivers/media/platform/omap3isp/ispresizer.c output->height = clamp(output->height, min_height, max_height); clamp 872 drivers/media/platform/omap3isp/ispresizer.c output->width = clamp(output->width, min_width, clamp 167 drivers/media/platform/omap3isp/ispvideo.c bpl = clamp(bpl, min_bpl, video->bpl_max); clamp 162 drivers/media/platform/qcom/venus/vdec.c pixmp->width = clamp(pixmp->width, frame_width_min(inst), clamp 164 drivers/media/platform/qcom/venus/vdec.c pixmp->height = clamp(pixmp->height, frame_height_min(inst), clamp 313 drivers/media/platform/qcom/venus/venc.c pixmp->width = clamp(pixmp->width, frame_width_min(inst), clamp 315 drivers/media/platform/qcom/venus/venc.c pixmp->height = clamp(pixmp->height, frame_height_min(inst), clamp 1501 drivers/media/platform/rcar_fdp1.c pix->width = clamp(width, FDP1_MIN_W, FDP1_MAX_W); clamp 1505 drivers/media/platform/rcar_fdp1.c pix->height = clamp(height, FDP1_MIN_H / 2, FDP1_MAX_H / 2); clamp 1507 drivers/media/platform/rcar_fdp1.c pix->height = clamp(height, FDP1_MIN_H, FDP1_MAX_H); clamp 987 drivers/media/platform/stm32/stm32-dcmi.c pix->width = clamp(pix->width, MIN_WIDTH, MAX_WIDTH); clamp 988 drivers/media/platform/stm32/stm32-dcmi.c pix->height = clamp(pix->height, MIN_HEIGHT, MAX_HEIGHT); clamp 123 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c pix->width = clamp(width, _fmt->hsub, CSI_MAX_WIDTH); clamp 124 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c pix->height = clamp(height, _fmt->vsub, CSI_MAX_HEIGHT); clamp 857 drivers/media/platform/vicodec/vicodec-core.c pix->width = clamp(pix->width, MIN_WIDTH, MAX_WIDTH); clamp 860 drivers/media/platform/vicodec/vicodec-core.c pix->height = clamp(pix->height, MIN_HEIGHT, MAX_HEIGHT); clamp 880 drivers/media/platform/vicodec/vicodec-core.c pix_mp->width = clamp(pix_mp->width, MIN_WIDTH, MAX_WIDTH); clamp 883 drivers/media/platform/vicodec/vicodec-core.c pix_mp->height = clamp(pix_mp->height, MIN_HEIGHT, MAX_HEIGHT); clamp 1213 drivers/media/platform/vicodec/vicodec-core.c q_data->visible_width = clamp(s->r.width, MIN_WIDTH, clamp 1216 drivers/media/platform/vicodec/vicodec-core.c q_data->visible_height = clamp(s->r.height, MIN_HEIGHT, clamp 193 drivers/media/platform/vivid/vivid-radio-rx.c freq = clamp(dev->radio_rx_freq, low, high); clamp 128 drivers/media/platform/vsp1/vsp1_brx.c fmt->width = clamp(fmt->width, BRX_MIN_SIZE, BRX_MAX_SIZE); clamp 129 drivers/media/platform/vsp1/vsp1_brx.c fmt->height = clamp(fmt->height, BRX_MIN_SIZE, BRX_MAX_SIZE); clamp 323 drivers/media/platform/vsp1/vsp1_histo.c sel->r.width = clamp(sel->r.width, crop->width / 4, crop->width); clamp 328 drivers/media/platform/vsp1/vsp1_histo.c sel->r.height = clamp(sel->r.height, crop->height / 4, crop->height); clamp 181 drivers/media/platform/vsp1/vsp1_sru.c fmt->width = clamp(fmt->width, SRU_MIN_SIZE, SRU_MAX_SIZE); clamp 182 drivers/media/platform/vsp1/vsp1_sru.c fmt->height = clamp(fmt->height, SRU_MIN_SIZE, SRU_MAX_SIZE); clamp 181 drivers/media/platform/vsp1/vsp1_uds.c fmt->width = clamp(fmt->width, UDS_MIN_SIZE, UDS_MAX_SIZE); clamp 182 drivers/media/platform/vsp1/vsp1_uds.c fmt->height = clamp(fmt->height, UDS_MIN_SIZE, UDS_MAX_SIZE); clamp 192 drivers/media/platform/vsp1/vsp1_uds.c fmt->width = clamp(fmt->width, minimum, maximum); clamp 194 drivers/media/platform/vsp1/vsp1_uds.c fmt->height = clamp(fmt->height, minimum, maximum); clamp 137 drivers/media/platform/vsp1/vsp1_video.c pix->width = clamp(width, info->hsub, VSP1_VIDEO_MAX_WIDTH); clamp 138 drivers/media/platform/vsp1/vsp1_video.c pix->height = clamp(height, info->vsub, VSP1_VIDEO_MAX_HEIGHT); clamp 567 drivers/media/platform/xilinx/xilinx-dma.c pix->width = clamp(width, min_width, max_width) / info->bpp; clamp 568 drivers/media/platform/xilinx/xilinx-dma.c pix->height = clamp(pix->height, XVIP_DMA_MIN_HEIGHT, clamp 579 drivers/media/platform/xilinx/xilinx-dma.c pix->bytesperline = clamp(bpl, min_bpl, max_bpl); clamp 220 drivers/media/radio/radio-cadet.c freq = clamp(freq, bands[dev->is_fm_band].rangelow, clamp 97 drivers/media/radio/radio-isa.c freq = clamp(freq, FREQ_LOW, FREQ_HIGH); clamp 210 drivers/media/radio/radio-keene.c freq = clamp(freq, FREQ_MIN * FREQ_MUL, FREQ_MAX * FREQ_MUL); clamp 124 drivers/media/radio/radio-sf16fmi.c fmi->curfreq = clamp(fmi->curfreq, RSF16_MINFREQ, RSF16_MAXFREQ); clamp 704 drivers/media/radio/radio-si476x.c freq = clamp(freq, clamp 344 drivers/media/radio/radio-tea5764.c freq = clamp(freq, FREQ_MIN * FREQ_MUL, FREQ_MAX * FREQ_MUL); clamp 178 drivers/media/radio/radio-tea5777.c freq = clamp(tea->freq, bands[tea->band].rangelow, clamp 398 drivers/media/radio/radio-tea5777.c tea->freq = clamp(tea->freq, rangelow, clamp 281 drivers/media/radio/si470x/radio-si470x-common.c freq = clamp(freq, bands[radio->band].rangelow, clamp 170 drivers/media/radio/tea575x.c return clamp(freq * 16, bands[tea->band].rangelow, clamp 384 drivers/media/radio/tea575x.c tea->freq = clamp(tea->freq, bands[i].rangelow, clamp 103 drivers/media/radio/tef6862.c freq = clamp(freq, TEF6862_LO_FREQ, TEF6862_HI_FREQ); clamp 176 drivers/media/tuners/msi001.c bandwidth = clamp(bandwidth, 200000U, 8000000U); clamp 608 drivers/media/usb/gspca/stk1135.c fmt->fmt.pix.width = clamp(fmt->fmt.pix.width, 32U, 1280U); clamp 609 drivers/media/usb/gspca/stk1135.c fmt->fmt.pix.height = clamp(fmt->fmt.pix.height, 32U, 1024U); clamp 1101 drivers/media/usb/hackrf/hackrf.c uitmp = clamp(f->frequency, bands_adc_dac[0].rangelow, clamp 1111 drivers/media/usb/hackrf/hackrf.c uitmp = clamp(f->frequency, bands_rx_tx[0].rangelow, clamp 1610 drivers/media/usb/uvc/uvc_ctrl.c xctrl->value = clamp(xctrl->value, min, max); clamp 1617 drivers/media/usb/uvc/uvc_ctrl.c xctrl->value = clamp(xctrl->value, 0, 1); clamp 101 drivers/media/v4l2-core/v4l2-common.c x = clamp(x, (min + ~mask) & mask, max & mask); clamp 113 drivers/media/v4l2-core/v4l2-common.c x = clamp(x, min, max); clamp 999 drivers/mtd/nand/raw/mtk_nand.c if (clamp(mtk_nand->bad_mark.sec, start, end) == mtk_nand->bad_mark.sec) clamp 296 drivers/mtd/nand/raw/txx9ndfmc.c hold = clamp(hold, 1, 15); clamp 298 drivers/mtd/nand/raw/txx9ndfmc.c spw = clamp(spw, 1, 15); clamp 92 drivers/net/can/dev.c tseg2 = clamp(tseg2, btc->tseg2_min, btc->tseg2_max); clamp 2761 drivers/net/ethernet/amd/xgbe/xgbe-dev.c weight = clamp(weight, min_weight, total_weight); clamp 70 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c nq = clamp(nq, 1, BNX2X_MAX_QUEUES(bp)); clamp 3254 drivers/net/ethernet/chelsio/cxgb4/sge.c timer_index = clamp(timer_index, 0, SGE_TIMERREGS - 1); clamp 1478 drivers/net/ethernet/intel/i40e/i40e_debugfs.c bytes = clamp(bytes, (u16)1024, (u16)I40E_MAX_AQ_BUF_SIZE); clamp 1817 drivers/net/wireless/ath/ath5k/phy.c i_coff = clamp(i_coff, -32, 31); /* signed 6 bit */ clamp 1823 drivers/net/wireless/ath/ath5k/phy.c q_coff = clamp(q_coff, -16, 15); /* signed 5 bit */ clamp 430 drivers/net/wireless/ath/carl9170/rx.c status->rate_idx = clamp(head->plcp[3] & 0x7f, 0, 75); clamp 595 drivers/net/wireless/intersil/p54/txrx.c survey->noise = clamp(priv->noise, -128, 127); clamp 21 drivers/net/wireless/realtek/rtlwifi/stats.c s8 ret_val = clamp(-value, 0, 33) * 3; clamp 1373 drivers/platform/x86/asus-wmi.c value = clamp(value, 0, 255); clamp 121 drivers/pwm/pwm-lp3943.c period_ns = clamp(period_ns, LP3943_MIN_PERIOD, LP3943_MAX_PERIOD); clamp 96 drivers/pwm/pwm-sifive.c scale = clamp(ilog2(scale_pow) - PWM_SIFIVE_CMPWIDTH, 0, 0xf); clamp 427 drivers/rtc/rtc-armada38x.c offset = clamp(offset, -484270L, 488558L); clamp 326 drivers/rtc/rtc-pcf8523.c reg_m0 = clamp(DIV_ROUND_CLOSEST(offset, 4340), -64L, 63L); clamp 327 drivers/rtc/rtc-pcf8523.c reg_m1 = clamp(DIV_ROUND_CLOSEST(offset, 4069), -64L, 63L); clamp 400 drivers/rtc/rtc-rv3028.c offset = clamp(offset, -244141L, 243187L) * 1000; clamp 699 drivers/scsi/aha1542.c u8 oncmd[] = { CMD_BUSON_TIME, clamp(bus_on, 2, 15) }; clamp 707 drivers/scsi/aha1542.c u8 offcmd[] = { CMD_BUSOFF_TIME, clamp(bus_off, 1, 64) }; clamp 5360 drivers/scsi/scsi_debug.c clamp(sdebug_unmap_max_blocks, 0U, 0xffffffffU); clamp 5363 drivers/scsi/scsi_debug.c clamp(sdebug_unmap_max_desc, 0U, 256U); clamp 5366 drivers/scsi/scsi_debug.c clamp(sdebug_unmap_granularity, 1U, 0xffffffffU); clamp 216 drivers/slimbus/messaging.c code = clamp(code, 1, (int)ARRAY_SIZE(sizetocode)); clamp 134 drivers/spi/spi-coldfire-qspi.c return clamp((MCFQSPI_BUSCLK + speed_hz - 1) / speed_hz, 2u, 255u); clamp 122 drivers/spi/spi-ep93xx.c rate = clamp(rate, master->min_speed_hz, master->max_speed_hz); clamp 504 drivers/spi/spi-img-spfi.c div = clamp(512 / (1 << get_count_order(div)), 1, 128); clamp 260 drivers/spi/spi-rspi.c rspi_write8(rspi, clamp(spbr, 0, 255), RSPI_SPBR); clamp 307 drivers/spi/spi-rspi.c rspi_write8(rspi, clamp(spbr, 0, 255), RSPI_SPBR); clamp 342 drivers/spi/spi-rspi.c rspi_write8(rspi, clamp(spbr, 0, 255), RSPI_SPBR); clamp 192 drivers/spi/spi-txx9.c n = clamp(n, SPI_MIN_DIVIDER, SPI_MAX_DIVIDER); clamp 423 drivers/staging/greybus/camera.c clk_freq = clamp(clk_freq + GB_CAMERA_CSI_CLK_FREQ_MARGIN, clamp 742 drivers/staging/iio/adc/ad7280a.c val = clamp(val, 0L, 0xFFL); clamp 415 drivers/staging/iio/impedance-analyzer/ad5933.c val = clamp(val, (u16)0, (u16)0x7FF); clamp 430 drivers/staging/iio/impedance-analyzer/ad5933.c val = clamp(val, (u16)0, (u16)511); clamp 148 drivers/staging/media/hantro/hantro_g1_vp8_dec.c u32 lf_level = clamp(lf->level + seg->lf_update[i], clamp 189 drivers/staging/media/hantro/hantro_g1_vp8_dec.c u32 quant = clamp(q->y_ac_qi + seg->quant_update[i], clamp 289 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c u32 lf_level = clamp(lf->level + seg->lf_update[i], clamp 327 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c u32 quant = clamp(q->y_ac_qi + seg->quant_update[i], clamp 1028 drivers/staging/media/ipu3/ipu3-css.c clamp(max(fls(css_pipe->rect[IPU3_CSS_RECT_BDS].width / clamp 172 drivers/staging/media/ipu3/ipu3-v4l2.c fmt->format.width = clamp(fmt->format.width, clamp 175 drivers/staging/media/ipu3/ipu3-v4l2.c fmt->format.height = clamp(fmt->format.height, clamp 179 drivers/staging/media/ipu3/ipu3-v4l2.c fmt->format.width = clamp(fmt->format.width, clamp 182 drivers/staging/media/ipu3/ipu3-v4l2.c fmt->format.height = clamp(fmt->format.height, clamp 528 drivers/staging/media/meson/vdec/vdec.c pixmp->width = clamp(pixmp->width, (u32)256, fmt_out->max_width); clamp 529 drivers/staging/media/meson/vdec/vdec.c pixmp->height = clamp(pixmp->height, (u32)144, fmt_out->max_height); clamp 145 drivers/staging/media/omap4iss/iss_video.c bpl = clamp(bpl, min_bpl, video->bpl_max); clamp 102 drivers/staging/media/sunxi/cedrus/cedrus_video.c width = clamp(width, CEDRUS_MIN_WIDTH, CEDRUS_MAX_WIDTH); clamp 103 drivers/staging/media/sunxi/cedrus/cedrus_video.c height = clamp(height, CEDRUS_MIN_HEIGHT, CEDRUS_MAX_HEIGHT); clamp 56 drivers/staging/rtl8188eu/hal/odm_hwconfig.c s8 ret_val = clamp(-value, 0, 33) * 3; clamp 113 drivers/thermal/intel/intel_powerclamp.c duration = clamp(new_duration, 6ul, 25ul); clamp 161 drivers/thermal/intel/intel_powerclamp.c window_size = clamp(new_window_size, 2ul, 10ul); clamp 532 drivers/thermal/intel/intel_powerclamp.c set_target_ratio = clamp(set_target_ratio, 0U, MAX_TARGET_RATIO - 1); clamp 625 drivers/thermal/intel/intel_powerclamp.c new_target_ratio = clamp(new_target_ratio, 0UL, clamp 251 drivers/thermal/power_allocator.c power_range = clamp(power_range, (s64)0, (s64)max_allocatable_power); clamp 1066 drivers/tty/serial/max310x.c val = (clamp(port->rs485.delay_rts_before_send, 0U, 15U) << 4) | clamp 1067 drivers/tty/serial/max310x.c clamp(port->rs485.delay_rts_after_send, 0U, 15U); clamp 2250 drivers/tty/serial/sh-sci.c dl = clamp(dl, 1U, 65535U); clamp 2315 drivers/tty/serial/sh-sci.c br = clamp(br, 1U, 256U); clamp 2551 drivers/tty/serial/sh-sci.c int shift = clamp(deviation / 2, -8, 7); clamp 348 drivers/usb/core/config.c n = clamp(fls(d->bInterval) + 3, i, j); clamp 357 drivers/usb/core/config.c n = clamp(fls(d->bInterval), i, j); clamp 601 drivers/usb/gadget/function/f_uvc.c opts->streaming_interval = clamp(opts->streaming_interval, 1U, 16U); clamp 602 drivers/usb/gadget/function/f_uvc.c opts->streaming_maxpacket = clamp(opts->streaming_maxpacket, 1U, 3072U); clamp 1132 drivers/usb/serial/cp210x.c baud = clamp(tty->termios.c_ospeed, priv->min_speed, priv->max_speed); clamp 902 drivers/video/fbdev/s3fb.c value = clamp((htotal + hsstart + 1) / 2 + 2, hsstart + 4, htotal + 1); clamp 969 fs/cifs/netmisc.c day = clamp(day, 1, 31); clamp 970 fs/cifs/netmisc.c month = clamp(month, 1, 12); clamp 1578 fs/gfs2/rgrp.c extlen = clamp(extlen, (u32)RGRP_RSRV_MINBLKS, free_blocks); clamp 2194 fs/inode.c t.tv_sec = clamp(t.tv_sec, sb->s_time_min, sb->s_time_max); clamp 1695 include/linux/usb.h interval = clamp(interval, 1, 16); clamp 4580 kernel/sched/core.c increment = clamp(increment, -NICE_WIDTH, NICE_WIDTH); clamp 5145 kernel/sched/core.c attr->sched_nice = clamp(attr->sched_nice, MIN_NICE, MAX_NICE); clamp 1998 kernel/sched/fair.c p->numa_scan_period = clamp(p->numa_scan_period + diff, clamp 7818 kernel/sched/fair.c interval = clamp(interval, 1UL, max_load_balance_interval); clamp 9113 kernel/sched/fair.c interval = clamp(interval, 1UL, max_load_balance_interval); clamp 10405 kernel/sched/fair.c shares = clamp(shares, scale_load(MIN_SHARES), scale_load(MAX_SHARES)); clamp 2340 kernel/sched/sched.h return clamp(util, min_util, max_util); clamp 307 kernel/time/ntp.c offset = clamp(offset, -USEC_PER_SEC, USEC_PER_SEC); clamp 315 kernel/time/ntp.c offset = clamp(offset, -MAXPHASE, MAXPHASE); clamp 101 lib/dynamic_queue_limits.c limit = clamp(limit, dql->min_limit, dql->max_limit); clamp 2406 lib/vsprintf.c spec->field_width = clamp(width, -FIELD_WIDTH_MAX, FIELD_WIDTH_MAX); clamp 2415 lib/vsprintf.c spec->precision = clamp(prec, 0, PRECISION_MAX); clamp 198 mm/memblock.c this_start = clamp(this_start, start, end); clamp 199 mm/memblock.c this_end = clamp(this_end, start, end); clamp 234 mm/memblock.c this_start = clamp(this_start, start, end); clamp 235 mm/memblock.c this_end = clamp(this_end, start, end); clamp 73 mm/memtest.c this_start = clamp(this_start, start, end); clamp 74 mm/memtest.c this_end = clamp(this_end, start, end); clamp 826 mm/page-writeback.c return clamp(pos_ratio, 0LL, 2LL << RATELIMIT_CALC_SHIFT); clamp 6402 mm/page_alloc.c *zone_start_pfn = clamp(node_start_pfn, zone_low, zone_high); clamp 6403 mm/page_alloc.c *zone_end_pfn = clamp(node_end_pfn, zone_low, zone_high); clamp 6433 mm/page_alloc.c start_pfn = clamp(start_pfn, range_start_pfn, range_end_pfn); clamp 6434 mm/page_alloc.c end_pfn = clamp(end_pfn, range_start_pfn, range_end_pfn); clamp 6469 mm/page_alloc.c zone_start_pfn = clamp(node_start_pfn, zone_low, zone_high); clamp 6470 mm/page_alloc.c zone_end_pfn = clamp(node_end_pfn, zone_low, zone_high); clamp 6487 mm/page_alloc.c start_pfn = clamp(memblock_region_memory_base_pfn(r), clamp 6489 mm/page_alloc.c end_pfn = clamp(memblock_region_memory_end_pfn(r), clamp 7776 mm/page_alloc.c min_pages = clamp(min_pages, SWAP_CLUSTER_MAX, 128UL); clamp 1890 mm/percpu.c nr_to_pop = clamp(PCPU_EMPTY_POP_PAGES_HIGH - clamp 1148 net/ipv4/ip_tunnel.c mtu = clamp(dev->mtu, (unsigned int)ETH_MIN_MTU, clamp 45 net/ipv4/tcp_cubic.c #define HYSTART_DELAY_THRESH(x) clamp(x, HYSTART_DELAY_MIN, HYSTART_DELAY_MAX) clamp 665 net/ipv6/ip6_vti.c dev->mtu = clamp(dev->mtu, dev->min_mtu, dev->max_mtu); clamp 1782 net/netfilter/ipvs/ip_vs_sync.c count = clamp(sysctl_sync_ports(ipvs), 1, IPVS_SYNC_PORTS_MAX); clamp 1806 net/netfilter/ipvs/ip_vs_sync.c clamp(dev->mtu, 1500U, 65535U) : 1500U; clamp 30 samples/bpf/tcp_clamp_kern.c int clamp = 100; clamp 71 samples/bpf/tcp_clamp_kern.c &clamp, sizeof(clamp)); clamp 77 samples/bpf/tcp_clamp_kern.c &clamp, sizeof(clamp)); clamp 233 sound/firewire/fireworks/fireworks.c snd_efw_resp_buf_size = clamp(snd_efw_resp_buf_size, clamp 557 sound/soc/codecs/sgtl5000.c l = clamp(l, 0x3c, 0xfc); clamp 558 sound/soc/codecs/sgtl5000.c r = clamp(r, 0x3c, 0xfc); clamp 605 sound/soc/codecs/sgtl5000.c l = clamp(l, 0, 0xfc - 0x3c); clamp 606 sound/soc/codecs/sgtl5000.c r = clamp(r, 0, 0xfc - 0x3c); clamp 38 sound/usb/line6/playback.c pv = clamp(val, -0x8000, 0x7fff); clamp 53 sound/usb/line6/playback.c val = clamp(val, -0x800000, 0x7fffff); clamp 125 sound/usb/line6/playback.c pov = clamp(val, -0x8000, 0x7fff); clamp 315 sound/usb/mixer_scarlett.c val = clamp(val / 256, -128, (int)kctl->private_value) + clamp 410 sound/usb/mixer_scarlett.c val = clamp(val - opt->start, 0, opt->len-1); clamp 464 sound/usb/mixer_scarlett.c ucontrol->value.enumerated.item[0] = clamp((int)buf[0], 0, 1); clamp 996 sound/usb/mixer_scarlett_gen2.c private->master_vol = clamp( clamp 1619 sound/usb/mixer_scarlett_gen2.c val = clamp(ucontrol->value.integer.value[0], clamp 1875 sound/usb/mixer_scarlett_gen2.c private->master_vol = clamp( clamp 1889 sound/usb/mixer_scarlett_gen2.c volume = clamp(volume + SCARLETT2_VOLUME_BIAS,