···557557 pulls in some header files containing file scope host assembly codes.558558 - You can add "-fno-jump-tables" to work around the switch table issue.559559560560- Otherwise, you can use bpf target.560560+ Otherwise, you can use bpf target. Additionally, you _must_ use bpf target561561+ when:562562+563563+ - Your program uses data structures with pointer or long / unsigned long564564+ types that interface with BPF helpers or context data structures. Access565565+ into these structures is verified by the BPF verifier and may result566566+ in verification failures if the native architecture is not aligned with567567+ the BPF architecture, e.g. 64-bit. An example of this is568568+ BPF_PROG_TYPE_SK_MSG require '-target bpf'561569562570Happy BPF hacking!
···44- compatible:55 atmel,maxtouch6677+ The following compatibles have been used in various products but are88+ deprecated:99+ atmel,qt602240_ts1010+ atmel,atmel_mxt_ts1111+ atmel,atmel_mxt_tp1212+ atmel,mXT2241313+714- reg: The I2C address of the device815916- interrupts: The sink for the touchpad's IRQ output
+2-2
Documentation/doc-guide/parse-headers.rst
···177177****178178179179180180-Report bugs to Mauro Carvalho Chehab <mchehab@s-opensource.com>180180+Report bugs to Mauro Carvalho Chehab <mchehab@kernel.org>181181182182183183COPYRIGHT184184*********185185186186187187-Copyright (c) 2016 by Mauro Carvalho Chehab <mchehab@s-opensource.com>.187187+Copyright (c) 2016 by Mauro Carvalho Chehab <mchehab+samsung@kernel.org>.188188189189License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>.190190
+1-1
Documentation/media/uapi/rc/keytable.c.rst
···7788 /* keytable.c - This program allows checking/replacing keys at IR991010- Copyright (C) 2006-2009 Mauro Carvalho Chehab <mchehab@infradead.org>1010+ Copyright (C) 2006-2009 Mauro Carvalho Chehab <mchehab@kernel.org>11111212 This program is free software; you can redistribute it and/or modify1313 it under the terms of the GNU General Public License as published by
+1-1
Documentation/media/uapi/v4l/v4l2grab.c.rst
···66.. code-block:: c7788 /* V4L2 video picture grabber99- Copyright (C) 2009 Mauro Carvalho Chehab <mchehab@infradead.org>99+ Copyright (C) 2009 Mauro Carvalho Chehab <mchehab@kernel.org>10101111 This program is free software; you can redistribute it and/or modify1212 it under the terms of the GNU General Public License as published by
+2-2
Documentation/sphinx/parse-headers.pl
···387387388388=head1 BUGS389389390390-Report bugs to Mauro Carvalho Chehab <mchehab@s-opensource.com>390390+Report bugs to Mauro Carvalho Chehab <mchehab@kernel.org>391391392392=head1 COPYRIGHT393393394394-Copyright (c) 2016 by Mauro Carvalho Chehab <mchehab@s-opensource.com>.394394+Copyright (c) 2016 by Mauro Carvalho Chehab <mchehab+samsung@kernel.org>.395395396396License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>.397397
···66help. Contact the Chinese maintainer if this translation is outdated77or if there is a problem with the translation.8899-Maintainer: Mauro Carvalho Chehab <mchehab@infradead.org>99+Maintainer: Mauro Carvalho Chehab <mchehab@kernel.org>1010Chinese maintainer: Fu Wei <tekkamanninja@gmail.com>1111---------------------------------------------------------------------1212Documentation/video4linux/v4l2-framework.txt 的中文翻译···1414如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文1515交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻1616译存在问题,请联系中文版维护者。1717-英文版维护者: Mauro Carvalho Chehab <mchehab@infradead.org>1717+英文版维护者: Mauro Carvalho Chehab <mchehab@kernel.org>1818中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com>1919中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com>2020中文版校译者: 傅炜 Fu Wei <tekkamanninja@gmail.com>
···448448 * Checks all the children of @parent for a matching @id. If none449449 * found, it allocates a new device and returns it.450450 */451451-static struct parisc_device * alloc_tree_node(struct device *parent, char id)451451+static struct parisc_device * __init alloc_tree_node(452452+ struct device *parent, char id)452453{453454 struct match_id_data d = {454455 .id = id,···826825 * devices which are not physically connected (such as extra serial &827826 * keyboard ports). This problem is not yet solved.828827 */829829-static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high,830830- struct device *parent)828828+static void __init walk_native_bus(unsigned long io_io_low,829829+ unsigned long io_io_high, struct device *parent)831830{832831 int i, devices_found = 0;833832 unsigned long hpa = io_io_low;
+1-1
arch/parisc/kernel/pci.c
···174174 * pcibios_init_bridge() initializes cache line and default latency175175 * for pci controllers and pci-pci bridges176176 */177177-void __init pcibios_init_bridge(struct pci_dev *dev)177177+void __ref pcibios_init_bridge(struct pci_dev *dev)178178{179179 unsigned short bridge_ctl, bridge_ctl_new;180180
···837837 if (pdc_instr(&instr) == PDC_OK)838838 ivap[0] = instr;839839840840+ /*841841+ * Rules for the checksum of the HPMC handler:842842+ * 1. The IVA does not point to PDC/PDH space (ie: the OS has installed843843+ * its own IVA).844844+ * 2. The word at IVA + 32 is nonzero.845845+ * 3. If Length (IVA + 60) is not zero, then Length (IVA + 60) and846846+ * Address (IVA + 56) are word-aligned.847847+ * 4. The checksum of the 8 words starting at IVA + 32 plus the sum of848848+ * the Length/4 words starting at Address is zero.849849+ */850850+840851 /* Compute Checksum for HPMC handler */841852 length = os_hpmc_size;842853 ivap[7] = length;
+1-1
arch/parisc/mm/init.c
···516516 }517517}518518519519-void free_initmem(void)519519+void __ref free_initmem(void)520520{521521 unsigned long init_begin = (unsigned long)__init_begin;522522 unsigned long init_end = (unsigned long)__init_end;
+1-1
arch/sparc/include/uapi/asm/oradax.h
···33 *44 * This program is free software: you can redistribute it and/or modify55 * it under the terms of the GNU General Public License as published by66- * the Free Software Foundation, either version 3 of the License, or66+ * the Free Software Foundation, either version 2 of the License, or77 * (at your option) any later version.88 *99 * This program is distributed in the hope that it will be useful,
+1-1
arch/sparc/kernel/vio.c
···403403 if (err) {404404 printk(KERN_ERR "VIO: Could not register device %s, err=%d\n",405405 dev_name(&vdev->dev), err);406406- kfree(vdev);406406+ put_device(&vdev->dev);407407 return NULL;408408 }409409 if (vdev->dp)
···10271027 break;1028102810291029 case BPF_JMP | BPF_JA:10301030- jmp_offset = addrs[i + insn->off] - addrs[i];10301030+ if (insn->off == -1)10311031+ /* -1 jmp instructions will always jump10321032+ * backwards two bytes. Explicitly handling10331033+ * this case avoids wasting too many passes10341034+ * when there are long sequences of replaced10351035+ * dead code.10361036+ */10371037+ jmp_offset = -2;10381038+ else10391039+ jmp_offset = addrs[i + insn->off] - addrs[i];10401040+10311041 if (!jmp_offset)10321042 /* optimize out nop jumps */10331043 break;···12361226 for (pass = 0; pass < 20 || image; pass++) {12371227 proglen = do_jit(prog, addrs, image, oldproglen, &ctx);12381228 if (proglen <= 0) {12291229+out_image:12391230 image = NULL;12401231 if (header)12411232 bpf_jit_binary_free(header);···12471236 if (proglen != oldproglen) {12481237 pr_err("bpf_jit: proglen=%d != oldproglen=%d\n",12491238 proglen, oldproglen);12501250- prog = orig_prog;12511251- goto out_addrs;12391239+ goto out_image;12521240 }12531241 break;12541242 }···12831273 prog = orig_prog;12841274 }1285127512861286- if (!prog->is_func || extra_pass) {12761276+ if (!image || !prog->is_func || extra_pass) {12871277out_addrs:12881278 kfree(addrs);12891279 kfree(jit_data);
+31-55
arch/x86/xen/enlighten_pv.c
···421421{422422 unsigned long va = dtr->address;423423 unsigned int size = dtr->size + 1;424424- unsigned pages = DIV_ROUND_UP(size, PAGE_SIZE);425425- unsigned long frames[pages];426426- int f;424424+ unsigned long pfn, mfn;425425+ int level;426426+ pte_t *ptep;427427+ void *virt;427428428428- /*429429- * A GDT can be up to 64k in size, which corresponds to 8192430430- * 8-byte entries, or 16 4k pages..431431- */432432-433433- BUG_ON(size > 65536);429429+ /* @size should be at most GDT_SIZE which is smaller than PAGE_SIZE. */430430+ BUG_ON(size > PAGE_SIZE);434431 BUG_ON(va & ~PAGE_MASK);435432436436- for (f = 0; va < dtr->address + size; va += PAGE_SIZE, f++) {437437- int level;438438- pte_t *ptep;439439- unsigned long pfn, mfn;440440- void *virt;433433+ /*434434+ * The GDT is per-cpu and is in the percpu data area.435435+ * That can be virtually mapped, so we need to do a436436+ * page-walk to get the underlying MFN for the437437+ * hypercall. The page can also be in the kernel's438438+ * linear range, so we need to RO that mapping too.439439+ */440440+ ptep = lookup_address(va, &level);441441+ BUG_ON(ptep == NULL);441442442442- /*443443- * The GDT is per-cpu and is in the percpu data area.444444- * That can be virtually mapped, so we need to do a445445- * page-walk to get the underlying MFN for the446446- * hypercall. The page can also be in the kernel's447447- * linear range, so we need to RO that mapping too.448448- */449449- ptep = lookup_address(va, &level);450450- BUG_ON(ptep == NULL);443443+ pfn = pte_pfn(*ptep);444444+ mfn = pfn_to_mfn(pfn);445445+ virt = __va(PFN_PHYS(pfn));451446452452- pfn = pte_pfn(*ptep);453453- mfn = pfn_to_mfn(pfn);454454- virt = __va(PFN_PHYS(pfn));447447+ make_lowmem_page_readonly((void *)va);448448+ make_lowmem_page_readonly(virt);455449456456- frames[f] = mfn;457457-458458- make_lowmem_page_readonly((void *)va);459459- make_lowmem_page_readonly(virt);460460- }461461-462462- if (HYPERVISOR_set_gdt(frames, size / sizeof(struct desc_struct)))450450+ if (HYPERVISOR_set_gdt(&mfn, size / sizeof(struct desc_struct)))463451 BUG();464452}465453···458470{459471 unsigned long va = dtr->address;460472 unsigned int size = dtr->size + 1;461461- unsigned pages = DIV_ROUND_UP(size, PAGE_SIZE);462462- unsigned long frames[pages];463463- int f;473473+ unsigned long pfn, mfn;474474+ pte_t pte;464475465465- /*466466- * A GDT can be up to 64k in size, which corresponds to 8192467467- * 8-byte entries, or 16 4k pages..468468- */469469-470470- BUG_ON(size > 65536);476476+ /* @size should be at most GDT_SIZE which is smaller than PAGE_SIZE. */477477+ BUG_ON(size > PAGE_SIZE);471478 BUG_ON(va & ~PAGE_MASK);472479473473- for (f = 0; va < dtr->address + size; va += PAGE_SIZE, f++) {474474- pte_t pte;475475- unsigned long pfn, mfn;480480+ pfn = virt_to_pfn(va);481481+ mfn = pfn_to_mfn(pfn);476482477477- pfn = virt_to_pfn(va);478478- mfn = pfn_to_mfn(pfn);483483+ pte = pfn_pte(pfn, PAGE_KERNEL_RO);479484480480- pte = pfn_pte(pfn, PAGE_KERNEL_RO);485485+ if (HYPERVISOR_update_va_mapping((unsigned long)va, pte, 0))486486+ BUG();481487482482- if (HYPERVISOR_update_va_mapping((unsigned long)va, pte, 0))483483- BUG();484484-485485- frames[f] = mfn;486486- }487487-488488- if (HYPERVISOR_set_gdt(frames, size / sizeof(struct desc_struct)))488488+ if (HYPERVISOR_set_gdt(&mfn, size / sizeof(struct desc_struct)))489489 BUG();490490}491491
+28-12
block/blk-mq.c
···9595{9696 struct mq_inflight *mi = priv;97979898- if (blk_mq_rq_state(rq) == MQ_RQ_IN_FLIGHT) {9999- /*100100- * index[0] counts the specific partition that was asked101101- * for. index[1] counts the ones that are active on the102102- * whole device, so increment that if mi->part is indeed103103- * a partition, and not a whole device.104104- */105105- if (rq->part == mi->part)106106- mi->inflight[0]++;107107- if (mi->part->partno)108108- mi->inflight[1]++;109109- }9898+ /*9999+ * index[0] counts the specific partition that was asked for. index[1]100100+ * counts the ones that are active on the whole device, so increment101101+ * that if mi->part is indeed a partition, and not a whole device.102102+ */103103+ if (rq->part == mi->part)104104+ mi->inflight[0]++;105105+ if (mi->part->partno)106106+ mi->inflight[1]++;110107}111108112109void blk_mq_in_flight(struct request_queue *q, struct hd_struct *part,···113116114117 inflight[0] = inflight[1] = 0;115118 blk_mq_queue_tag_busy_iter(q, blk_mq_check_inflight, &mi);119119+}120120+121121+static void blk_mq_check_inflight_rw(struct blk_mq_hw_ctx *hctx,122122+ struct request *rq, void *priv,123123+ bool reserved)124124+{125125+ struct mq_inflight *mi = priv;126126+127127+ if (rq->part == mi->part)128128+ mi->inflight[rq_data_dir(rq)]++;129129+}130130+131131+void blk_mq_in_flight_rw(struct request_queue *q, struct hd_struct *part,132132+ unsigned int inflight[2])133133+{134134+ struct mq_inflight mi = { .part = part, .inflight = inflight, };135135+136136+ inflight[0] = inflight[1] = 0;137137+ blk_mq_queue_tag_busy_iter(q, blk_mq_check_inflight_rw, &mi);116138}117139118140void blk_freeze_queue_start(struct request_queue *q)
+3-1
block/blk-mq.h
···188188}189189190190void blk_mq_in_flight(struct request_queue *q, struct hd_struct *part,191191- unsigned int inflight[2]);191191+ unsigned int inflight[2]);192192+void blk_mq_in_flight_rw(struct request_queue *q, struct hd_struct *part,193193+ unsigned int inflight[2]);192194193195static inline void blk_mq_put_dispatch_budget(struct blk_mq_hw_ctx *hctx)194196{
···126126 cpu->perf_caps.lowest_perf, cpu_num, ret);127127}128128129129+/*130130+ * The PCC subspace describes the rate at which platform can accept commands131131+ * on the shared PCC channel (including READs which do not count towards freq132132+ * trasition requests), so ideally we need to use the PCC values as a fallback133133+ * if we don't have a platform specific transition_delay_us134134+ */135135+#ifdef CONFIG_ARM64136136+#include <asm/cputype.h>137137+138138+static unsigned int cppc_cpufreq_get_transition_delay_us(int cpu)139139+{140140+ unsigned long implementor = read_cpuid_implementor();141141+ unsigned long part_num = read_cpuid_part_number();142142+ unsigned int delay_us = 0;143143+144144+ switch (implementor) {145145+ case ARM_CPU_IMP_QCOM:146146+ switch (part_num) {147147+ case QCOM_CPU_PART_FALKOR_V1:148148+ case QCOM_CPU_PART_FALKOR:149149+ delay_us = 10000;150150+ break;151151+ default:152152+ delay_us = cppc_get_transition_latency(cpu) / NSEC_PER_USEC;153153+ break;154154+ }155155+ break;156156+ default:157157+ delay_us = cppc_get_transition_latency(cpu) / NSEC_PER_USEC;158158+ break;159159+ }160160+161161+ return delay_us;162162+}163163+164164+#else165165+166166+static unsigned int cppc_cpufreq_get_transition_delay_us(int cpu)167167+{168168+ return cppc_get_transition_latency(cpu) / NSEC_PER_USEC;169169+}170170+#endif171171+129172static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)130173{131174 struct cppc_cpudata *cpu;···205162 cpu->perf_caps.highest_perf;206163 policy->cpuinfo.max_freq = cppc_dmi_max_khz;207164208208- policy->transition_delay_us = cppc_get_transition_latency(cpu_num) /209209- NSEC_PER_USEC;165165+ policy->transition_delay_us = cppc_cpufreq_get_transition_delay_us(cpu_num);210166 policy->shared_type = cpu->shared_type;211167212168 if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) {
···760760struct vc4_async_flip_state {761761 struct drm_crtc *crtc;762762 struct drm_framebuffer *fb;763763+ struct drm_framebuffer *old_fb;763764 struct drm_pending_vblank_event *event;764765765766 struct vc4_seqno_cb cb;···790789791790 drm_crtc_vblank_put(crtc);792791 drm_framebuffer_put(flip_state->fb);792792+793793+ /* Decrement the BO usecnt in order to keep the inc/dec calls balanced794794+ * when the planes are updated through the async update path.795795+ * FIXME: we should move to generic async-page-flip when it's796796+ * available, so that we can get rid of this hand-made cleanup_fb()797797+ * logic.798798+ */799799+ if (flip_state->old_fb) {800800+ struct drm_gem_cma_object *cma_bo;801801+ struct vc4_bo *bo;802802+803803+ cma_bo = drm_fb_cma_get_gem_obj(flip_state->old_fb, 0);804804+ bo = to_vc4_bo(&cma_bo->base);805805+ vc4_bo_dec_usecnt(bo);806806+ drm_framebuffer_put(flip_state->old_fb);807807+ }808808+793809 kfree(flip_state);794810795811 up(&vc4->async_modeset);···831813 struct drm_gem_cma_object *cma_bo = drm_fb_cma_get_gem_obj(fb, 0);832814 struct vc4_bo *bo = to_vc4_bo(&cma_bo->base);833815816816+ /* Increment the BO usecnt here, so that we never end up with an817817+ * unbalanced number of vc4_bo_{dec,inc}_usecnt() calls when the818818+ * plane is later updated through the non-async path.819819+ * FIXME: we should move to generic async-page-flip when it's820820+ * available, so that we can get rid of this hand-made prepare_fb()821821+ * logic.822822+ */823823+ ret = vc4_bo_inc_usecnt(bo);824824+ if (ret)825825+ return ret;826826+834827 flip_state = kzalloc(sizeof(*flip_state), GFP_KERNEL);835835- if (!flip_state)828828+ if (!flip_state) {829829+ vc4_bo_dec_usecnt(bo);836830 return -ENOMEM;831831+ }837832838833 drm_framebuffer_get(fb);839834 flip_state->fb = fb;···857826 ret = down_interruptible(&vc4->async_modeset);858827 if (ret) {859828 drm_framebuffer_put(fb);829829+ vc4_bo_dec_usecnt(bo);860830 kfree(flip_state);861831 return ret;862832 }833833+834834+ /* Save the current FB before it's replaced by the new one in835835+ * drm_atomic_set_fb_for_plane(). We'll need the old FB in836836+ * vc4_async_page_flip_complete() to decrement the BO usecnt and keep837837+ * it consistent.838838+ * FIXME: we should move to generic async-page-flip when it's839839+ * available, so that we can get rid of this hand-made cleanup_fb()840840+ * logic.841841+ */842842+ flip_state->old_fb = plane->state->fb;843843+ if (flip_state->old_fb)844844+ drm_framebuffer_get(flip_state->old_fb);863845864846 WARN_ON(drm_crtc_vblank_get(crtc) != 0);865847
···25952595 vmw_kms_helper_buffer_finish(res->dev_priv, NULL, ctx->buf,25962596 out_fence, NULL);2597259725982598+ vmw_dmabuf_unreference(&ctx->buf);25982599 vmw_resource_unreserve(res, false, NULL, 0);25992600 mutex_unlock(&res->dev_priv->cmdbuf_mutex);26002601}···26812680 struct vmw_display_unit *du;26822681 struct drm_display_mode *mode;26832682 int i = 0;26832683+ int ret = 0;2684268426852685+ mutex_lock(&dev_priv->dev->mode_config.mutex);26852686 list_for_each_entry(con, &dev_priv->dev->mode_config.connector_list,26862687 head) {26872688 if (i == unit)···2694269126952692 if (i != unit) {26962693 DRM_ERROR("Could not find initial display unit.\n");26972697- return -EINVAL;26942694+ ret = -EINVAL;26952695+ goto out_unlock;26982696 }2699269727002698 if (list_empty(&con->modes))···2703269927042700 if (list_empty(&con->modes)) {27052701 DRM_ERROR("Could not find initial display mode.\n");27062706- return -EINVAL;27022702+ ret = -EINVAL;27032703+ goto out_unlock;27072704 }2708270527092706 du = vmw_connector_to_du(con);···27252720 head);27262721 }2727272227282728- return 0;27232723+ out_unlock:27242724+ mutex_unlock(&dev_priv->dev->mode_config.mutex);27252725+27262726+ return ret;27292727}2730272827312729/**
+4-1
drivers/infiniband/Kconfig
···6161 pages on demand instead.62626363config INFINIBAND_ADDR_TRANS6464- bool6464+ bool "RDMA/CM"6565 depends on INFINIBAND6666 default y6767+ ---help---6868+ Support for RDMA communication manager (CM).6969+ This allows for a generic connection abstraction over RDMA.67706871config INFINIBAND_ADDR_TRANS_CONFIGFS6972 bool
+35-20
drivers/infiniband/core/cache.c
···291291 * so lookup free slot only if requested.292292 */293293 if (pempty && empty < 0) {294294- if (data->props & GID_TABLE_ENTRY_INVALID) {295295- /* Found an invalid (free) entry; allocate it */296296- if (data->props & GID_TABLE_ENTRY_DEFAULT) {297297- if (default_gid)298298- empty = curr_index;299299- } else {300300- empty = curr_index;301301- }294294+ if (data->props & GID_TABLE_ENTRY_INVALID &&295295+ (default_gid ==296296+ !!(data->props & GID_TABLE_ENTRY_DEFAULT))) {297297+ /*298298+ * Found an invalid (free) entry; allocate it.299299+ * If default GID is requested, then our300300+ * found slot must be one of the DEFAULT301301+ * reserved slots or we fail.302302+ * This ensures that only DEFAULT reserved303303+ * slots are used for default property GIDs.304304+ */305305+ empty = curr_index;302306 }303307 }304308···424420 return ret;425421}426422427427-int ib_cache_gid_del(struct ib_device *ib_dev, u8 port,428428- union ib_gid *gid, struct ib_gid_attr *attr)423423+static int424424+_ib_cache_gid_del(struct ib_device *ib_dev, u8 port,425425+ union ib_gid *gid, struct ib_gid_attr *attr,426426+ unsigned long mask, bool default_gid)429427{430428 struct ib_gid_table *table;431429 int ret = 0;···437431438432 mutex_lock(&table->lock);439433440440- ix = find_gid(table, gid, attr, false,441441- GID_ATTR_FIND_MASK_GID |442442- GID_ATTR_FIND_MASK_GID_TYPE |443443- GID_ATTR_FIND_MASK_NETDEV,444444- NULL);434434+ ix = find_gid(table, gid, attr, default_gid, mask, NULL);445435 if (ix < 0) {446436 ret = -EINVAL;447437 goto out_unlock;···452450 pr_debug("%s: can't delete gid %pI6 error=%d\n",453451 __func__, gid->raw, ret);454452 return ret;453453+}454454+455455+int ib_cache_gid_del(struct ib_device *ib_dev, u8 port,456456+ union ib_gid *gid, struct ib_gid_attr *attr)457457+{458458+ unsigned long mask = GID_ATTR_FIND_MASK_GID |459459+ GID_ATTR_FIND_MASK_GID_TYPE |460460+ GID_ATTR_FIND_MASK_DEFAULT |461461+ GID_ATTR_FIND_MASK_NETDEV;462462+463463+ return _ib_cache_gid_del(ib_dev, port, gid, attr, mask, false);455464}456465457466int ib_cache_gid_del_all_netdev_gids(struct ib_device *ib_dev, u8 port,···741728 unsigned long gid_type_mask,742729 enum ib_cache_gid_default_mode mode)743730{744744- union ib_gid gid;731731+ union ib_gid gid = { };745732 struct ib_gid_attr gid_attr;746733 struct ib_gid_table *table;747734 unsigned int gid_type;···749736750737 table = ib_dev->cache.ports[port - rdma_start_port(ib_dev)].gid;751738752752- make_default_gid(ndev, &gid);739739+ mask = GID_ATTR_FIND_MASK_GID_TYPE |740740+ GID_ATTR_FIND_MASK_DEFAULT |741741+ GID_ATTR_FIND_MASK_NETDEV;753742 memset(&gid_attr, 0, sizeof(gid_attr));754743 gid_attr.ndev = ndev;755744···762747 gid_attr.gid_type = gid_type;763748764749 if (mode == IB_CACHE_GID_DEFAULT_MODE_SET) {765765- mask = GID_ATTR_FIND_MASK_GID_TYPE |766766- GID_ATTR_FIND_MASK_DEFAULT;750750+ make_default_gid(ndev, &gid);767751 __ib_cache_gid_add(ib_dev, port, &gid,768752 &gid_attr, mask, true);769753 } else if (mode == IB_CACHE_GID_DEFAULT_MODE_DELETE) {770770- ib_cache_gid_del(ib_dev, port, &gid, &gid_attr);754754+ _ib_cache_gid_del(ib_dev, port, &gid,755755+ &gid_attr, mask, true);771756 }772757 }773758}
+43-17
drivers/infiniband/core/cma.c
···382382#define CMA_VERSION 0x00383383384384struct cma_req_info {385385+ struct sockaddr_storage listen_addr_storage;386386+ struct sockaddr_storage src_addr_storage;385387 struct ib_device *device;386388 int port;387389 union ib_gid local_gid;···868866{869867 struct ib_qp_attr qp_attr;870868 int qp_attr_mask, ret;871871- union ib_gid sgid;872869873870 mutex_lock(&id_priv->qp_mutex);874871 if (!id_priv->id.qp) {···887886888887 qp_attr.qp_state = IB_QPS_RTR;889888 ret = rdma_init_qp_attr(&id_priv->id, &qp_attr, &qp_attr_mask);890890- if (ret)891891- goto out;892892-893893- ret = ib_query_gid(id_priv->id.device, id_priv->id.port_num,894894- rdma_ah_read_grh(&qp_attr.ah_attr)->sgid_index,895895- &sgid, NULL);896889 if (ret)897890 goto out;898891···13351340}1336134113371342static struct net_device *cma_get_net_dev(struct ib_cm_event *ib_event,13381338- const struct cma_req_info *req)13431343+ struct cma_req_info *req)13391344{13401340- struct sockaddr_storage listen_addr_storage, src_addr_storage;13411341- struct sockaddr *listen_addr = (struct sockaddr *)&listen_addr_storage,13421342- *src_addr = (struct sockaddr *)&src_addr_storage;13451345+ struct sockaddr *listen_addr =13461346+ (struct sockaddr *)&req->listen_addr_storage;13471347+ struct sockaddr *src_addr = (struct sockaddr *)&req->src_addr_storage;13431348 struct net_device *net_dev;13441349 const union ib_gid *gid = req->has_gid ? &req->local_gid : NULL;13451350 int err;···13531358 gid, listen_addr);13541359 if (!net_dev)13551360 return ERR_PTR(-ENODEV);13561356-13571357- if (!validate_net_dev(net_dev, listen_addr, src_addr)) {13581358- dev_put(net_dev);13591359- return ERR_PTR(-EHOSTUNREACH);13601360- }1361136113621362 return net_dev;13631363}···14801490 }14811491 }1482149214931493+ /*14941494+ * Net namespace might be getting deleted while route lookup,14951495+ * cm_id lookup is in progress. Therefore, perform netdevice14961496+ * validation, cm_id lookup under rcu lock.14971497+ * RCU lock along with netdevice state check, synchronizes with14981498+ * netdevice migrating to different net namespace and also avoids14991499+ * case where net namespace doesn't get deleted while lookup is in15001500+ * progress.15011501+ * If the device state is not IFF_UP, its properties such as ifindex15021502+ * and nd_net cannot be trusted to remain valid without rcu lock.15031503+ * net/core/dev.c change_net_namespace() ensures to synchronize with15041504+ * ongoing operations on net device after device is closed using15051505+ * synchronize_net().15061506+ */15071507+ rcu_read_lock();15081508+ if (*net_dev) {15091509+ /*15101510+ * If netdevice is down, it is likely that it is administratively15111511+ * down or it might be migrating to different namespace.15121512+ * In that case avoid further processing, as the net namespace15131513+ * or ifindex may change.15141514+ */15151515+ if (((*net_dev)->flags & IFF_UP) == 0) {15161516+ id_priv = ERR_PTR(-EHOSTUNREACH);15171517+ goto err;15181518+ }15191519+15201520+ if (!validate_net_dev(*net_dev,15211521+ (struct sockaddr *)&req.listen_addr_storage,15221522+ (struct sockaddr *)&req.src_addr_storage)) {15231523+ id_priv = ERR_PTR(-EHOSTUNREACH);15241524+ goto err;15251525+ }15261526+ }15271527+14831528 bind_list = cma_ps_find(*net_dev ? dev_net(*net_dev) : &init_net,14841529 rdma_ps_from_service_id(req.service_id),14851530 cma_port_from_service_id(req.service_id));14861531 id_priv = cma_find_listener(bind_list, cm_id, ib_event, &req, *net_dev);15321532+err:15331533+ rcu_read_unlock();14871534 if (IS_ERR(id_priv) && *net_dev) {14881535 dev_put(*net_dev);14891536 *net_dev = NULL;14901537 }14911491-14921538 return id_priv;14931539}14941540
+4-1
drivers/infiniband/core/iwpm_util.c
···114114 struct sockaddr_storage *mapped_sockaddr,115115 u8 nl_client)116116{117117- struct hlist_head *hash_bucket_head;117117+ struct hlist_head *hash_bucket_head = NULL;118118 struct iwpm_mapping_info *map_info;119119 unsigned long flags;120120 int ret = -EINVAL;···142142 }143143 }144144 spin_unlock_irqrestore(&iwpm_mapinfo_lock, flags);145145+146146+ if (!hash_bucket_head)147147+ kfree(map_info);145148 return ret;146149}147150
+2-2
drivers/infiniband/core/mad.c
···5959MODULE_PARM_DESC(recv_queue_size, "Size of receive queue in number of work requests");60606161static struct list_head ib_mad_port_list;6262-static u32 ib_mad_client_id = 0;6262+static atomic_t ib_mad_client_id = ATOMIC_INIT(0);63636464/* Port list lock */6565static DEFINE_SPINLOCK(ib_mad_port_list_lock);···377377 }378378379379 spin_lock_irqsave(&port_priv->reg_lock, flags);380380- mad_agent_priv->agent.hi_tid = ++ib_mad_client_id;380380+ mad_agent_priv->agent.hi_tid = atomic_inc_return(&ib_mad_client_id);381381382382 /*383383 * Make sure MAD registration (if supplied)
···8888 * pio buffers per ctxt, etc.) Zero means use one user context per CPU.8989 */9090int num_user_contexts = -1;9191-module_param_named(num_user_contexts, num_user_contexts, uint, S_IRUGO);9191+module_param_named(num_user_contexts, num_user_contexts, int, 0444);9292MODULE_PARM_DESC(9393- num_user_contexts, "Set max number of user contexts to use");9393+ num_user_contexts, "Set max number of user contexts to use (default: -1 will use the real (non-HT) CPU count)");94949595uint krcvqs[RXE_NUM_DATA_VL];9696int krcvqsset;···12091209 kfree(ad);12101210}1211121112121212-static void __hfi1_free_devdata(struct kobject *kobj)12121212+/**12131213+ * hfi1_clean_devdata - cleans up per-unit data structure12141214+ * @dd: pointer to a valid devdata structure12151215+ *12161216+ * It cleans up all data structures set up by12171217+ * by hfi1_alloc_devdata().12181218+ */12191219+static void hfi1_clean_devdata(struct hfi1_devdata *dd)12131220{12141214- struct hfi1_devdata *dd =12151215- container_of(kobj, struct hfi1_devdata, kobj);12161221 struct hfi1_asic_data *ad;12171222 unsigned long flags;1218122312191224 spin_lock_irqsave(&hfi1_devs_lock, flags);12201220- idr_remove(&hfi1_unit_table, dd->unit);12211221- list_del(&dd->list);12251225+ if (!list_empty(&dd->list)) {12261226+ idr_remove(&hfi1_unit_table, dd->unit);12271227+ list_del_init(&dd->list);12281228+ }12221229 ad = release_asic_data(dd);12231230 spin_unlock_irqrestore(&hfi1_devs_lock, flags);12241224- if (ad)12251225- finalize_asic_data(dd, ad);12311231+12321232+ finalize_asic_data(dd, ad);12261233 free_platform_config(dd);12271234 rcu_barrier(); /* wait for rcu callbacks to complete */12281235 free_percpu(dd->int_counter);12291236 free_percpu(dd->rcv_limit);12301237 free_percpu(dd->send_schedule);12311238 free_percpu(dd->tx_opstats);12391239+ dd->int_counter = NULL;12401240+ dd->rcv_limit = NULL;12411241+ dd->send_schedule = NULL;12421242+ dd->tx_opstats = NULL;12321243 sdma_clean(dd, dd->num_sdma);12331244 rvt_dealloc_device(&dd->verbs_dev.rdi);12451245+}12461246+12471247+static void __hfi1_free_devdata(struct kobject *kobj)12481248+{12491249+ struct hfi1_devdata *dd =12501250+ container_of(kobj, struct hfi1_devdata, kobj);12511251+12521252+ hfi1_clean_devdata(dd);12341253}1235125412361255static struct kobj_type hfi1_devdata_type = {···12841265 return ERR_PTR(-ENOMEM);12851266 dd->num_pports = nports;12861267 dd->pport = (struct hfi1_pportdata *)(dd + 1);12681268+ dd->pcidev = pdev;12691269+ pci_set_drvdata(pdev, dd);1287127012881271 INIT_LIST_HEAD(&dd->list);12891272 idr_preload(GFP_KERNEL);···13521331 return dd;1353133213541333bail:13551355- if (!list_empty(&dd->list))13561356- list_del_init(&dd->list);13571357- rvt_dealloc_device(&dd->verbs_dev.rdi);13341334+ hfi1_clean_devdata(dd);13581335 return ERR_PTR(ret);13591336}13601337
-3
drivers/infiniband/hw/hfi1/pcie.c
···163163 resource_size_t addr;164164 int ret = 0;165165166166- dd->pcidev = pdev;167167- pci_set_drvdata(pdev, dd);168168-169166 addr = pci_resource_start(pdev, 0);170167 len = pci_resource_len(pdev, 0);171168
+1
drivers/infiniband/hw/hfi1/platform.c
···199199{200200 /* Release memory allocated for eprom or fallback file read. */201201 kfree(dd->platform_config.data);202202+ dd->platform_config.data = NULL;202203}203204204205void get_port_type(struct hfi1_pportdata *ppd)
···733733 ohdr->bth[2] = cpu_to_be32(bth2);734734}735735736736+/**737737+ * hfi1_make_ruc_header_16B - build a 16B header738738+ * @qp: the queue pair739739+ * @ohdr: a pointer to the destination header memory740740+ * @bth0: bth0 passed in from the RC/UC builder741741+ * @bth2: bth2 passed in from the RC/UC builder742742+ * @middle: non zero implies indicates ahg "could" be used743743+ * @ps: the current packet state744744+ *745745+ * This routine may disarm ahg under these situations:746746+ * - packet needs a GRH747747+ * - BECN needed748748+ * - migration state not IB_MIG_MIGRATED749749+ */736750static inline void hfi1_make_ruc_header_16B(struct rvt_qp *qp,737751 struct ib_other_headers *ohdr,738752 u32 bth0, u32 bth2, int middle,···791777 else792778 middle = 0;793779780780+ if (qp->s_flags & RVT_S_ECN) {781781+ qp->s_flags &= ~RVT_S_ECN;782782+ /* we recently received a FECN, so return a BECN */783783+ becn = true;784784+ middle = 0;785785+ }794786 if (middle)795787 build_ahg(qp, bth2);796788 else···804784805785 bth0 |= pkey;806786 bth0 |= extra_bytes << 20;807807- if (qp->s_flags & RVT_S_ECN) {808808- qp->s_flags &= ~RVT_S_ECN;809809- /* we recently received a FECN, so return a BECN */810810- becn = true;811811- }812787 hfi1_make_ruc_bth(qp, ohdr, bth0, bth1, bth2);813788814789 if (!ppd->lid)···821806 pkey, becn, 0, l4, priv->s_sc);822807}823808809809+/**810810+ * hfi1_make_ruc_header_9B - build a 9B header811811+ * @qp: the queue pair812812+ * @ohdr: a pointer to the destination header memory813813+ * @bth0: bth0 passed in from the RC/UC builder814814+ * @bth2: bth2 passed in from the RC/UC builder815815+ * @middle: non zero implies indicates ahg "could" be used816816+ * @ps: the current packet state817817+ *818818+ * This routine may disarm ahg under these situations:819819+ * - packet needs a GRH820820+ * - BECN needed821821+ * - migration state not IB_MIG_MIGRATED822822+ */824823static inline void hfi1_make_ruc_header_9B(struct rvt_qp *qp,825824 struct ib_other_headers *ohdr,826825 u32 bth0, u32 bth2, int middle,···868839 else869840 middle = 0;870841842842+ if (qp->s_flags & RVT_S_ECN) {843843+ qp->s_flags &= ~RVT_S_ECN;844844+ /* we recently received a FECN, so return a BECN */845845+ bth1 |= (IB_BECN_MASK << IB_BECN_SHIFT);846846+ middle = 0;847847+ }871848 if (middle)872849 build_ahg(qp, bth2);873850 else···881846882847 bth0 |= pkey;883848 bth0 |= extra_bytes << 20;884884- if (qp->s_flags & RVT_S_ECN) {885885- qp->s_flags &= ~RVT_S_ECN;886886- /* we recently received a FECN, so return a BECN */887887- bth1 |= (IB_BECN_MASK << IB_BECN_SHIFT);888888- }889849 hfi1_make_ruc_bth(qp, ohdr, bth0, bth1, bth2);890850 hfi1_make_ib_hdr(&ps->s_txreq->phdr.hdr.ibh,891851 lrh0,
···11config INFINIBAND_SRP22 tristate "InfiniBand SCSI RDMA Protocol"33- depends on SCSI33+ depends on SCSI && INFINIBAND_ADDR_TRANS44 select SCSI_SRP_ATTRS55 ---help---66 Support for the SCSI RDMA Protocol over InfiniBand. This
+1-1
drivers/infiniband/ulp/srpt/Kconfig
···11config INFINIBAND_SRPT22 tristate "InfiniBand SCSI RDMA Protocol target support"33- depends on INFINIBAND && TARGET_CORE33+ depends on INFINIBAND && INFINIBAND_ADDR_TRANS && TARGET_CORE44 ---help---5566 Support for the SCSI RDMA Protocol (SRP) Target driver. The
···583583584584 x = (s8)(((packet[0] & 0x20) << 2) | (packet[1] & 0x7f));585585 y = (s8)(((packet[0] & 0x10) << 3) | (packet[2] & 0x7f));586586- z = packet[4] & 0x7c;586586+ z = packet[4] & 0x7f;587587588588 /*589589 * The x and y values tend to be quite large, and when used
+5-2
drivers/input/rmi4/rmi_spi.c
···147147 if (len > RMI_SPI_XFER_SIZE_LIMIT)148148 return -EINVAL;149149150150- if (rmi_spi->xfer_buf_size < len)151151- rmi_spi_manage_pools(rmi_spi, len);150150+ if (rmi_spi->xfer_buf_size < len) {151151+ ret = rmi_spi_manage_pools(rmi_spi, len);152152+ if (ret < 0)153153+ return ret;154154+ }152155153156 if (addr == 0)154157 /*
+1-1
drivers/input/touchscreen/Kconfig
···362362363363 If unsure, say N.364364365365- To compile this driver as a moudle, choose M here : the365365+ To compile this driver as a module, choose M here : the366366 module will be called hideep_ts.367367368368config TOUCHSCREEN_ILI210X
+124-76
drivers/input/touchscreen/atmel_mxt_ts.c
···280280 struct input_dev *input_dev;281281 char phys[64]; /* device physical location */282282 struct mxt_object *object_table;283283- struct mxt_info info;283283+ struct mxt_info *info;284284+ void *raw_info_block;284285 unsigned int irq;285286 unsigned int max_x;286287 unsigned int max_y;···461460{462461 u8 appmode = data->client->addr;463462 u8 bootloader;463463+ u8 family_id = data->info ? data->info->family_id : 0;464464465465 switch (appmode) {466466 case 0x4a:467467 case 0x4b:468468 /* Chips after 1664S use different scheme */469469- if (retry || data->info.family_id >= 0xa2) {469469+ if (retry || family_id >= 0xa2) {470470 bootloader = appmode - 0x24;471471 break;472472 }···694692 struct mxt_object *object;695693 int i;696694697697- for (i = 0; i < data->info.object_num; i++) {695695+ for (i = 0; i < data->info->object_num; i++) {698696 object = data->object_table + i;699697 if (object->type == type)700698 return object;···14641462 data_pos += offset;14651463 }1466146414671467- if (cfg_info.family_id != data->info.family_id) {14651465+ if (cfg_info.family_id != data->info->family_id) {14681466 dev_err(dev, "Family ID mismatch!\n");14691467 return -EINVAL;14701468 }1471146914721472- if (cfg_info.variant_id != data->info.variant_id) {14701470+ if (cfg_info.variant_id != data->info->variant_id) {14731471 dev_err(dev, "Variant ID mismatch!\n");14741472 return -EINVAL;14751473 }···1514151215151513 /* Malloc memory to store configuration */15161514 cfg_start_ofs = MXT_OBJECT_START +15171517- data->info.object_num * sizeof(struct mxt_object) +15151515+ data->info->object_num * sizeof(struct mxt_object) +15181516 MXT_INFO_CHECKSUM_SIZE;15191517 config_mem_size = data->mem_size - cfg_start_ofs;15201518 config_mem = kzalloc(config_mem_size, GFP_KERNEL);···15651563 return ret;15661564}1567156515681568-static int mxt_get_info(struct mxt_data *data)15691569-{15701570- struct i2c_client *client = data->client;15711571- struct mxt_info *info = &data->info;15721572- int error;15731573-15741574- /* Read 7-byte info block starting at address 0 */15751575- error = __mxt_read_reg(client, 0, sizeof(*info), info);15761576- if (error)15771577- return error;15781578-15791579- return 0;15801580-}15811581-15821566static void mxt_free_input_device(struct mxt_data *data)15831567{15841568 if (data->input_dev) {···15791591 video_unregister_device(&data->dbg.vdev);15801592 v4l2_device_unregister(&data->dbg.v4l2);15811593#endif15821582-15831583- kfree(data->object_table);15841594 data->object_table = NULL;15951595+ data->info = NULL;15961596+ kfree(data->raw_info_block);15971597+ data->raw_info_block = NULL;15851598 kfree(data->msg_buf);15861599 data->msg_buf = NULL;15871600 data->T5_address = 0;···15981609 data->max_reportid = 0;15991610}1600161116011601-static int mxt_get_object_table(struct mxt_data *data)16121612+static int mxt_parse_object_table(struct mxt_data *data,16131613+ struct mxt_object *object_table)16021614{16031615 struct i2c_client *client = data->client;16041604- size_t table_size;16051605- struct mxt_object *object_table;16061606- int error;16071616 int i;16081617 u8 reportid;16091618 u16 end_address;1610161916111611- table_size = data->info.object_num * sizeof(struct mxt_object);16121612- object_table = kzalloc(table_size, GFP_KERNEL);16131613- if (!object_table) {16141614- dev_err(&data->client->dev, "Failed to allocate memory\n");16151615- return -ENOMEM;16161616- }16171617-16181618- error = __mxt_read_reg(client, MXT_OBJECT_START, table_size,16191619- object_table);16201620- if (error) {16211621- kfree(object_table);16221622- return error;16231623- }16241624-16251620 /* Valid Report IDs start counting from 1 */16261621 reportid = 1;16271622 data->mem_size = 0;16281628- for (i = 0; i < data->info.object_num; i++) {16231623+ for (i = 0; i < data->info->object_num; i++) {16291624 struct mxt_object *object = object_table + i;16301625 u8 min_id, max_id;16311626···1633166016341661 switch (object->type) {16351662 case MXT_GEN_MESSAGE_T5:16361636- if (data->info.family_id == 0x80 &&16371637- data->info.version < 0x20) {16631663+ if (data->info->family_id == 0x80 &&16641664+ data->info->version < 0x20) {16381665 /*16391666 * On mXT224 firmware versions prior to V2.016401667 * read and discard unused CRC byte otherwise···16891716 /* If T44 exists, T5 position has to be directly after */16901717 if (data->T44_address && (data->T5_address != data->T44_address + 1)) {16911718 dev_err(&client->dev, "Invalid T44 position\n");16921692- error = -EINVAL;16931693- goto free_object_table;17191719+ return -EINVAL;16941720 }1695172116961722 data->msg_buf = kcalloc(data->max_reportid,16971723 data->T5_msg_size, GFP_KERNEL);16981698- if (!data->msg_buf) {16991699- dev_err(&client->dev, "Failed to allocate message buffer\n");17241724+ if (!data->msg_buf)17251725+ return -ENOMEM;17261726+17271727+ return 0;17281728+}17291729+17301730+static int mxt_read_info_block(struct mxt_data *data)17311731+{17321732+ struct i2c_client *client = data->client;17331733+ int error;17341734+ size_t size;17351735+ void *id_buf, *buf;17361736+ uint8_t num_objects;17371737+ u32 calculated_crc;17381738+ u8 *crc_ptr;17391739+17401740+ /* If info block already allocated, free it */17411741+ if (data->raw_info_block)17421742+ mxt_free_object_table(data);17431743+17441744+ /* Read 7-byte ID information block starting at address 0 */17451745+ size = sizeof(struct mxt_info);17461746+ id_buf = kzalloc(size, GFP_KERNEL);17471747+ if (!id_buf)17481748+ return -ENOMEM;17491749+17501750+ error = __mxt_read_reg(client, 0, size, id_buf);17511751+ if (error)17521752+ goto err_free_mem;17531753+17541754+ /* Resize buffer to give space for rest of info block */17551755+ num_objects = ((struct mxt_info *)id_buf)->object_num;17561756+ size += (num_objects * sizeof(struct mxt_object))17571757+ + MXT_INFO_CHECKSUM_SIZE;17581758+17591759+ buf = krealloc(id_buf, size, GFP_KERNEL);17601760+ if (!buf) {17001761 error = -ENOMEM;17011701- goto free_object_table;17621762+ goto err_free_mem;17631763+ }17641764+ id_buf = buf;17651765+17661766+ /* Read rest of info block */17671767+ error = __mxt_read_reg(client, MXT_OBJECT_START,17681768+ size - MXT_OBJECT_START,17691769+ id_buf + MXT_OBJECT_START);17701770+ if (error)17711771+ goto err_free_mem;17721772+17731773+ /* Extract & calculate checksum */17741774+ crc_ptr = id_buf + size - MXT_INFO_CHECKSUM_SIZE;17751775+ data->info_crc = crc_ptr[0] | (crc_ptr[1] << 8) | (crc_ptr[2] << 16);17761776+17771777+ calculated_crc = mxt_calculate_crc(id_buf, 0,17781778+ size - MXT_INFO_CHECKSUM_SIZE);17791779+17801780+ /*17811781+ * CRC mismatch can be caused by data corruption due to I2C comms17821782+ * issue or else device is not using Object Based Protocol (eg i2c-hid)17831783+ */17841784+ if ((data->info_crc == 0) || (data->info_crc != calculated_crc)) {17851785+ dev_err(&client->dev,17861786+ "Info Block CRC error calculated=0x%06X read=0x%06X\n",17871787+ calculated_crc, data->info_crc);17881788+ error = -EIO;17891789+ goto err_free_mem;17021790 }1703179117041704- data->object_table = object_table;17921792+ data->raw_info_block = id_buf;17931793+ data->info = (struct mxt_info *)id_buf;17941794+17951795+ dev_info(&client->dev,17961796+ "Family: %u Variant: %u Firmware V%u.%u.%02X Objects: %u\n",17971797+ data->info->family_id, data->info->variant_id,17981798+ data->info->version >> 4, data->info->version & 0xf,17991799+ data->info->build, data->info->object_num);18001800+18011801+ /* Parse object table information */18021802+ error = mxt_parse_object_table(data, id_buf + MXT_OBJECT_START);18031803+ if (error) {18041804+ dev_err(&client->dev, "Error %d parsing object table\n", error);18051805+ mxt_free_object_table(data);18061806+ goto err_free_mem;18071807+ }18081808+18091809+ data->object_table = (struct mxt_object *)(id_buf + MXT_OBJECT_START);1705181017061811 return 0;1707181217081708-free_object_table:17091709- mxt_free_object_table(data);18131813+err_free_mem:18141814+ kfree(id_buf);17101815 return error;17111816}17121817···20972046 int error;2098204720992048 while (1) {21002100- error = mxt_get_info(data);20492049+ error = mxt_read_info_block(data);21012050 if (!error)21022051 break;21032052···21282077 msleep(MXT_FW_RESET_TIME);21292078 }2130207921312131- /* Get object table information */21322132- error = mxt_get_object_table(data);21332133- if (error) {21342134- dev_err(&client->dev, "Error %d reading object table\n", error);21352135- return error;21362136- }21372137-21382080 error = mxt_acquire_irq(data);21392081 if (error)21402140- goto err_free_object_table;20822082+ return error;2141208321422084 error = request_firmware_nowait(THIS_MODULE, true, MXT_CFG_NAME,21432085 &client->dev, GFP_KERNEL, data,···21382094 if (error) {21392095 dev_err(&client->dev, "Failed to invoke firmware loader: %d\n",21402096 error);21412141- goto err_free_object_table;20972097+ return error;21422098 }2143209921442100 return 0;21452145-21462146-err_free_object_table:21472147- mxt_free_object_table(data);21482148- return error;21492101}2150210221512103static int mxt_set_t7_power_cfg(struct mxt_data *data, u8 sleep)···22022162static u16 mxt_get_debug_value(struct mxt_data *data, unsigned int x,22032163 unsigned int y)22042164{22052205- struct mxt_info *info = &data->info;21652165+ struct mxt_info *info = data->info;22062166 struct mxt_dbg *dbg = &data->dbg;22072167 unsigned int ofs, page;22082168 unsigned int col = 0;···2530249025312491static void mxt_debug_init(struct mxt_data *data)25322492{25332533- struct mxt_info *info = &data->info;24932493+ struct mxt_info *info = data->info;25342494 struct mxt_dbg *dbg = &data->dbg;25352495 struct mxt_object *object;25362496 int error;···26162576 const struct firmware *cfg)26172577{26182578 struct device *dev = &data->client->dev;26192619- struct mxt_info *info = &data->info;26202579 int error;2621258026222581 error = mxt_init_t7_power_cfg(data);···2640260126412602 mxt_debug_init(data);2642260326432643- dev_info(dev,26442644- "Family: %u Variant: %u Firmware V%u.%u.%02X Objects: %u\n",26452645- info->family_id, info->variant_id, info->version >> 4,26462646- info->version & 0xf, info->build, info->object_num);26472647-26482604 return 0;26492605}26502606···26482614 struct device_attribute *attr, char *buf)26492615{26502616 struct mxt_data *data = dev_get_drvdata(dev);26512651- struct mxt_info *info = &data->info;26172617+ struct mxt_info *info = data->info;26522618 return scnprintf(buf, PAGE_SIZE, "%u.%u.%02X\n",26532619 info->version >> 4, info->version & 0xf, info->build);26542620}···26582624 struct device_attribute *attr, char *buf)26592625{26602626 struct mxt_data *data = dev_get_drvdata(dev);26612661- struct mxt_info *info = &data->info;26272627+ struct mxt_info *info = data->info;26622628 return scnprintf(buf, PAGE_SIZE, "%u.%u\n",26632629 info->family_id, info->variant_id);26642630}···26972663 return -ENOMEM;2698266426992665 error = 0;27002700- for (i = 0; i < data->info.object_num; i++) {26662666+ for (i = 0; i < data->info->object_num; i++) {27012667 object = data->object_table + i;2702266827032669 if (!mxt_object_readable(object->type))···30693035 .driver_data = samus_platform_data,30703036 },30713037 {30383038+ /* Samsung Chromebook Pro */30393039+ .ident = "Samsung Chromebook Pro",30403040+ .matches = {30413041+ DMI_MATCH(DMI_SYS_VENDOR, "Google"),30423042+ DMI_MATCH(DMI_PRODUCT_NAME, "Caroline"),30433043+ },30443044+ .driver_data = samus_platform_data,30453045+ },30463046+ {30723047 /* Other Google Chromebooks */30733048 .ident = "Chromebook",30743049 .matches = {···3297325432983255static const struct of_device_id mxt_of_match[] = {32993256 { .compatible = "atmel,maxtouch", },32573257+ /* Compatibles listed below are deprecated */32583258+ { .compatible = "atmel,qt602240_ts", },32593259+ { .compatible = "atmel,atmel_mxt_ts", },32603260+ { .compatible = "atmel,atmel_mxt_tp", },32613261+ { .compatible = "atmel,mXT224", },33003262 {},33013263};33023264MODULE_DEVICE_TABLE(of, mxt_of_match);
+1-1
drivers/iommu/amd_iommu.c
···83838484static DEFINE_SPINLOCK(amd_iommu_devtable_lock);8585static DEFINE_SPINLOCK(pd_bitmap_lock);8686-static DEFINE_SPINLOCK(iommu_table_lock);87868887/* List of all available dev_data structures */8988static LLIST_HEAD(dev_data_list);···35613562 *****************************************************************************/3562356335633564static struct irq_chip amd_ir_chip;35653565+static DEFINE_SPINLOCK(iommu_table_lock);3564356635653567static void set_dte_irq_entry(u16 devid, struct irq_remap_table *table)35663568{
+25-29
drivers/iommu/dma-iommu.c
···167167 * @list: Reserved region list from iommu_get_resv_regions()168168 *169169 * IOMMU drivers can use this to implement their .get_resv_regions callback170170- * for general non-IOMMU-specific reservations. Currently, this covers host171171- * bridge windows for PCI devices and GICv3 ITS region reservation on ACPI172172- * based ARM platforms that may require HW MSI reservation.170170+ * for general non-IOMMU-specific reservations. Currently, this covers GICv3171171+ * ITS region reservation on ACPI based ARM platforms that may require HW MSI172172+ * reservation.173173 */174174void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list)175175{176176- struct pci_host_bridge *bridge;177177- struct resource_entry *window;178176179179- if (!is_of_node(dev->iommu_fwspec->iommu_fwnode) &&180180- iort_iommu_msi_get_resv_regions(dev, list) < 0)181181- return;177177+ if (!is_of_node(dev->iommu_fwspec->iommu_fwnode))178178+ iort_iommu_msi_get_resv_regions(dev, list);182179183183- if (!dev_is_pci(dev))184184- return;185185-186186- bridge = pci_find_host_bridge(to_pci_dev(dev)->bus);187187- resource_list_for_each_entry(window, &bridge->windows) {188188- struct iommu_resv_region *region;189189- phys_addr_t start;190190- size_t length;191191-192192- if (resource_type(window->res) != IORESOURCE_MEM)193193- continue;194194-195195- start = window->res->start - window->offset;196196- length = window->res->end - window->res->start + 1;197197- region = iommu_alloc_resv_region(start, length, 0,198198- IOMMU_RESV_RESERVED);199199- if (!region)200200- return;201201-202202- list_add_tail(®ion->list, list);203203- }204180}205181EXPORT_SYMBOL(iommu_dma_get_resv_regions);206182···205229 return 0;206230}207231232232+static void iova_reserve_pci_windows(struct pci_dev *dev,233233+ struct iova_domain *iovad)234234+{235235+ struct pci_host_bridge *bridge = pci_find_host_bridge(dev->bus);236236+ struct resource_entry *window;237237+ unsigned long lo, hi;238238+239239+ resource_list_for_each_entry(window, &bridge->windows) {240240+ if (resource_type(window->res) != IORESOURCE_MEM)241241+ continue;242242+243243+ lo = iova_pfn(iovad, window->res->start - window->offset);244244+ hi = iova_pfn(iovad, window->res->end - window->offset);245245+ reserve_iova(iovad, lo, hi);246246+ }247247+}248248+208249static int iova_reserve_iommu_regions(struct device *dev,209250 struct iommu_domain *domain)210251{···230237 struct iommu_resv_region *region;231238 LIST_HEAD(resv_regions);232239 int ret = 0;240240+241241+ if (dev_is_pci(dev))242242+ iova_reserve_pci_windows(to_pci_dev(dev), iovad);233243234244 iommu_get_resv_regions(dev, &resv_regions);235245 list_for_each_entry(region, &resv_regions, list) {
···11361136 irte->dest_id = IRTE_DEST(cfg->dest_apicid);1137113711381138 /* Update the hardware only if the interrupt is in remapped mode. */11391139- if (!force || ir_data->irq_2_iommu.mode == IRQ_REMAPPING)11391139+ if (force || ir_data->irq_2_iommu.mode == IRQ_REMAPPING)11401140 modify_irte(&ir_data->irq_2_iommu, irte);11411141}11421142
+9-2
drivers/iommu/rockchip-iommu.c
···10981098 data->iommu = platform_get_drvdata(iommu_dev);10991099 dev->archdata.iommu = data;1100110011011101- of_dev_put(iommu_dev);11011101+ platform_device_put(iommu_dev);1102110211031103 return 0;11041104}···11751175 for (i = 0; i < iommu->num_clocks; ++i)11761176 iommu->clocks[i].id = rk_iommu_clocks[i];1177117711781178+ /*11791179+ * iommu clocks should be present for all new devices and devicetrees11801180+ * but there are older devicetrees without clocks out in the wild.11811181+ * So clocks as optional for the time being.11821182+ */11781183 err = devm_clk_bulk_get(iommu->dev, iommu->num_clocks, iommu->clocks);11791179- if (err)11841184+ if (err == -ENOENT)11851185+ iommu->num_clocks = 0;11861186+ else if (err)11801187 return err;1181118811821189 err = clk_bulk_prepare(iommu->num_clocks, iommu->clocks);
+2-2
drivers/irqchip/qcom-irq-combiner.c
···11-/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.11+/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.22 *33 * This program is free software; you can redistribute it and/or modify44 * it under the terms of the GNU General Public License version 2 and···68686969 bit = readl_relaxed(combiner->regs[reg].addr);7070 status = bit & combiner->regs[reg].enabled;7171- if (!status)7171+ if (bit && !status)7272 pr_warn_ratelimited("Unexpected IRQ on CPU%d: (%08x %08lx %p)\n",7373 smp_processor_id(), bit,7474 combiner->regs[reg].enabled,
···106106107107void bch_data_verify(struct cached_dev *dc, struct bio *bio)108108{109109- char name[BDEVNAME_SIZE];110109 struct bio *check;111110 struct bio_vec bv, cbv;112111 struct bvec_iter iter, citer = { 0 };···133134 bv.bv_len),134135 dc->disk.c,135136 "verify failed at dev %s sector %llu",136136- bdevname(dc->bdev, name),137137+ dc->backing_dev_name,137138 (uint64_t) bio->bi_iter.bi_sector);138139139140 kunmap_atomic(p1);
+3-5
drivers/md/bcache/io.c
···5252/* IO errors */5353void bch_count_backing_io_errors(struct cached_dev *dc, struct bio *bio)5454{5555- char buf[BDEVNAME_SIZE];5655 unsigned errors;57565857 WARN_ONCE(!dc, "NULL pointer of struct cached_dev");···5960 errors = atomic_add_return(1, &dc->io_errors);6061 if (errors < dc->error_limit)6162 pr_err("%s: IO error on backing device, unrecoverable",6262- bio_devname(bio, buf));6363+ dc->backing_dev_name);6364 else6465 bch_cached_dev_error(dc);6566}···104105 }105106106107 if (error) {107107- char buf[BDEVNAME_SIZE];108108 unsigned errors = atomic_add_return(1 << IO_ERROR_SHIFT,109109 &ca->io_errors);110110 errors >>= IO_ERROR_SHIFT;111111112112 if (errors < ca->set->error_limit)113113 pr_err("%s: IO error on %s%s",114114- bdevname(ca->bdev, buf), m,114114+ ca->cache_dev_name, m,115115 is_read ? ", recovering." : ".");116116 else117117 bch_cache_set_error(ca->set,118118 "%s: too many IO errors %s",119119- bdevname(ca->bdev, buf), m);119119+ ca->cache_dev_name, m);120120 }121121}122122
+1-4
drivers/md/bcache/request.c
···649649 */650650 if (unlikely(s->iop.writeback &&651651 bio->bi_opf & REQ_PREFLUSH)) {652652- char buf[BDEVNAME_SIZE];653653-654654- bio_devname(bio, buf);655652 pr_err("Can't flush %s: returned bi_status %i",656656- buf, bio->bi_status);653653+ dc->backing_dev_name, bio->bi_status);657654 } else {658655 /* set to orig_bio->bi_status in bio_complete() */659656 s->iop.status = bio->bi_status;
+52-23
drivers/md/bcache/super.c
···936936static void cached_dev_detach_finish(struct work_struct *w)937937{938938 struct cached_dev *dc = container_of(w, struct cached_dev, detach);939939- char buf[BDEVNAME_SIZE];940939 struct closure cl;941940 closure_init_stack(&cl);942941···966967967968 mutex_unlock(&bch_register_lock);968969969969- pr_info("Caching disabled for %s", bdevname(dc->bdev, buf));970970+ pr_info("Caching disabled for %s", dc->backing_dev_name);970971971972 /* Drop ref we took in cached_dev_detach() */972973 closure_put(&dc->disk.cl);···998999{9991000 uint32_t rtime = cpu_to_le32(get_seconds());10001001 struct uuid_entry *u;10011001- char buf[BDEVNAME_SIZE];10021002 struct cached_dev *exist_dc, *t;10031003-10041004- bdevname(dc->bdev, buf);1005100310061004 if ((set_uuid && memcmp(set_uuid, c->sb.set_uuid, 16)) ||10071005 (!set_uuid && memcmp(dc->sb.set_uuid, c->sb.set_uuid, 16)))10081006 return -ENOENT;1009100710101008 if (dc->disk.c) {10111011- pr_err("Can't attach %s: already attached", buf);10091009+ pr_err("Can't attach %s: already attached",10101010+ dc->backing_dev_name);10121011 return -EINVAL;10131012 }1014101310151014 if (test_bit(CACHE_SET_STOPPING, &c->flags)) {10161016- pr_err("Can't attach %s: shutting down", buf);10151015+ pr_err("Can't attach %s: shutting down",10161016+ dc->backing_dev_name);10171017 return -EINVAL;10181018 }1019101910201020 if (dc->sb.block_size < c->sb.block_size) {10211021 /* Will die */10221022 pr_err("Couldn't attach %s: block size less than set's block size",10231023- buf);10231023+ dc->backing_dev_name);10241024 return -EINVAL;10251025 }10261026···10271029 list_for_each_entry_safe(exist_dc, t, &c->cached_devs, list) {10281030 if (!memcmp(dc->sb.uuid, exist_dc->sb.uuid, 16)) {10291031 pr_err("Tried to attach %s but duplicate UUID already attached",10301030- buf);10321032+ dc->backing_dev_name);1031103310321034 return -EINVAL;10331035 }···1045104710461048 if (!u) {10471049 if (BDEV_STATE(&dc->sb) == BDEV_STATE_DIRTY) {10481048- pr_err("Couldn't find uuid for %s in set", buf);10501050+ pr_err("Couldn't find uuid for %s in set",10511051+ dc->backing_dev_name);10491052 return -ENOENT;10501053 }1051105410521055 u = uuid_find_empty(c);10531056 if (!u) {10541054- pr_err("Not caching %s, no room for UUID", buf);10571057+ pr_err("Not caching %s, no room for UUID",10581058+ dc->backing_dev_name);10551059 return -EINVAL;10561060 }10571061 }···11121112 up_write(&dc->writeback_lock);1113111311141114 pr_info("Caching %s as %s on set %pU",11151115- bdevname(dc->bdev, buf), dc->disk.disk->disk_name,11151115+ dc->backing_dev_name,11161116+ dc->disk.disk->disk_name,11161117 dc->disk.c->sb.set_uuid);11171118 return 0;11181119}···12261225 struct block_device *bdev,12271226 struct cached_dev *dc)12281227{12291229- char name[BDEVNAME_SIZE];12301228 const char *err = "cannot allocate memory";12311229 struct cache_set *c;1232123012311231+ bdevname(bdev, dc->backing_dev_name);12331232 memcpy(&dc->sb, sb, sizeof(struct cache_sb));12341233 dc->bdev = bdev;12351234 dc->bdev->bd_holder = dc;···12371236 bio_init(&dc->sb_bio, dc->sb_bio.bi_inline_vecs, 1);12381237 bio_first_bvec_all(&dc->sb_bio)->bv_page = sb_page;12391238 get_page(sb_page);12391239+1240124012411241 if (cached_dev_init(dc, sb->block_size << 9))12421242 goto err;···12491247 if (bch_cache_accounting_add_kobjs(&dc->accounting, &dc->disk.kobj))12501248 goto err;1251124912521252- pr_info("registered backing device %s", bdevname(bdev, name));12501250+ pr_info("registered backing device %s", dc->backing_dev_name);1253125112541252 list_add(&dc->list, &uncached_devices);12551253 list_for_each_entry(c, &bch_cache_sets, list)···1261125912621260 return;12631261err:12641264- pr_notice("error %s: %s", bdevname(bdev, name), err);12621262+ pr_notice("error %s: %s", dc->backing_dev_name, err);12651263 bcache_device_stop(&dc->disk);12661264}12671265···1369136713701368bool bch_cached_dev_error(struct cached_dev *dc)13711369{13721372- char name[BDEVNAME_SIZE];13701370+ struct cache_set *c;1373137113741372 if (!dc || test_bit(BCACHE_DEV_CLOSING, &dc->disk.flags))13751373 return false;···13791377 smp_mb();1380137813811379 pr_err("stop %s: too many IO errors on backing device %s\n",13821382- dc->disk.disk->disk_name, bdevname(dc->bdev, name));13801380+ dc->disk.disk->disk_name, dc->backing_dev_name);13811381+13821382+ /*13831383+ * If the cached device is still attached to a cache set,13841384+ * even dc->io_disable is true and no more I/O requests13851385+ * accepted, cache device internal I/O (writeback scan or13861386+ * garbage collection) may still prevent bcache device from13871387+ * being stopped. So here CACHE_SET_IO_DISABLE should be13881388+ * set to c->flags too, to make the internal I/O to cache13891389+ * device rejected and stopped immediately.13901390+ * If c is NULL, that means the bcache device is not attached13911391+ * to any cache set, then no CACHE_SET_IO_DISABLE bit to set.13921392+ */13931393+ c = dc->disk.c;13941394+ if (c && test_and_set_bit(CACHE_SET_IO_DISABLE, &c->flags))13951395+ pr_info("CACHE_SET_IO_DISABLE already set");1383139613841397 bcache_device_stop(&dc->disk);13851398 return true;···14121395 return false;1413139614141397 if (test_and_set_bit(CACHE_SET_IO_DISABLE, &c->flags))14151415- pr_warn("CACHE_SET_IO_DISABLE already set");13981398+ pr_info("CACHE_SET_IO_DISABLE already set");1416139914171400 /* XXX: we can be called from atomic context14181401 acquire_console_sem();···15561539 */15571540 pr_warn("stop_when_cache_set_failed of %s is \"auto\" and cache is dirty, stop it to avoid potential data corruption.",15581541 d->disk->disk_name);15421542+ /*15431543+ * There might be a small time gap that cache set is15441544+ * released but bcache device is not. Inside this time15451545+ * gap, regular I/O requests will directly go into15461546+ * backing device as no cache set attached to. This15471547+ * behavior may also introduce potential inconsistence15481548+ * data in writeback mode while cache is dirty.15491549+ * Therefore before calling bcache_device_stop() due15501550+ * to a broken cache device, dc->io_disable should be15511551+ * explicitly set to true.15521552+ */15531553+ dc->io_disable = true;15541554+ /* make others know io_disable is true earlier */15551555+ smp_mb();15591556 bcache_device_stop(d);15601557 } else {15611558 /*···20342003static int register_cache(struct cache_sb *sb, struct page *sb_page,20352004 struct block_device *bdev, struct cache *ca)20362005{20372037- char name[BDEVNAME_SIZE];20382006 const char *err = NULL; /* must be set for any error case */20392007 int ret = 0;2040200820412041- bdevname(bdev, name);20422042-20092009+ bdevname(bdev, ca->cache_dev_name);20432010 memcpy(&ca->sb, sb, sizeof(struct cache_sb));20442011 ca->bdev = bdev;20452012 ca->bdev->bd_holder = ca;···20742045 goto out;20752046 }2076204720772077- pr_info("registered cache device %s", name);20482048+ pr_info("registered cache device %s", ca->cache_dev_name);2078204920792050out:20802051 kobject_put(&ca->kobj);2081205220822053err:20832054 if (err)20842084- pr_notice("error %s: %s", name, err);20552055+ pr_notice("error %s: %s", ca->cache_dev_name, err);2085205620862057 return ret;20872058}
···88 * Muting and tone control by Jonathan Isom <jisom@ematic.com>99 *1010 * Copyright (c) 2000 Eric Sandeen <eric_sandeen@bigfoot.com>1111- * Copyright (c) 2006 Mauro Carvalho Chehab <mchehab@infradead.org>1111+ * Copyright (c) 2006 Mauro Carvalho Chehab <mchehab@kernel.org>1212 * This code is placed under the terms of the GNU General Public License1313 * Based on tda9855.c by Steve VanDeBogart (vandebo@uclink.berkeley.edu)1414 * Which was based on tda8425.c by Greg Alexander (c) 1998
···55 * Author: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com>66 *77 * This code is partially based upon the TVP5150 driver88- * written by Mauro Carvalho Chehab (mchehab@infradead.org),88+ * written by Mauro Carvalho Chehab <mchehab@kernel.org>,99 * the TVP514x driver written by Vaibhav Hiremath <hvaibhav@ti.com>1010 * and the TVP7002 driver in the TI LSP 2.10.00.14. Revisions by1111 * Muralidharan Karicheri and Snehaprabha Narnakaje (TI).
+1-1
drivers/media/i2c/tvp7002_reg.h
···55 * Author: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com>66 *77 * This code is partially based upon the TVP5150 driver88- * written by Mauro Carvalho Chehab (mchehab@infradead.org),88+ * written by Mauro Carvalho Chehab <mchehab@kernel.org>,99 * the TVP514x driver written by Vaibhav Hiremath <hvaibhav@ti.com>1010 * and the TVP7002 driver in the TI LSP 2.10.00.141111 *
···11/*22 * Handlers for board audio hooks, splitted from bttv-cards33 *44- * Copyright (c) 2006 Mauro Carvalho Chehab (mchehab@infradead.org)44+ * Copyright (c) 2006 Mauro Carvalho Chehab <mchehab@kernel.org>55 * This code is placed under the terms of the GNU General Public License66 */77
+1-1
drivers/media/pci/bt8xx/bttv-audio-hook.h
···11/*22 * Handlers for board audio hooks, splitted from bttv-cards33 *44- * Copyright (c) 2006 Mauro Carvalho Chehab (mchehab@infradead.org)44+ * Copyright (c) 2006 Mauro Carvalho Chehab <mchehab@kernel.org>55 * This code is placed under the terms of the GNU General Public License66 */77
···1313 (c) 2005-2006 Nickolay V. Shmyrev <nshmyrev@yandex.ru>14141515 Fixes to be fully V4L2 compliant by1616- (c) 2006 Mauro Carvalho Chehab <mchehab@infradead.org>1616+ (c) 2006 Mauro Carvalho Chehab <mchehab@kernel.org>17171818 Cropping and overscan support1919 Copyright (C) 2005, 2006 Michael H. Schimek <mschimek@gmx.at>
+1-1
drivers/media/pci/bt8xx/bttv-i2c.c
···88 & Marcus Metzler (mocm@thp.uni-koeln.de)99 (c) 1999-2003 Gerd Knorr <kraxel@bytesex.org>10101111- (c) 2005 Mauro Carvalho Chehab <mchehab@infradead.org>1111+ (c) 2005 Mauro Carvalho Chehab <mchehab@kernel.org>1212 - Multituner support and i2c address binding13131414 This program is free software; you can redistribute it and/or modify
+1-1
drivers/media/pci/cx23885/cx23885-input.c
···1313 * Copyright (C) 2008 <srinivasa.deevi at conexant dot com>1414 * Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it>1515 * Markus Rechberger <mrechberger@gmail.com>1616- * Mauro Carvalho Chehab <mchehab@infradead.org>1616+ * Mauro Carvalho Chehab <mchehab@kernel.org>1717 * Sascha Sommer <saschasommer@freenet.de>1818 * Copyright (C) 2004, 2005 Chris Pascoe1919 * Copyright (C) 2003, 2004 Gerd Knorr
+2-2
drivers/media/pci/cx88/cx88-alsa.c
···44 *55 * (c) 2007 Trent Piepho <xyzzy@speakeasy.org>66 * (c) 2005,2006 Ricardo Cerqueira <v4l@cerqueira.org>77- * (c) 2005 Mauro Carvalho Chehab <mchehab@infradead.org>77+ * (c) 2005 Mauro Carvalho Chehab <mchehab@kernel.org>88 * Based on a dummy cx88 module by Gerd Knorr <kraxel@bytesex.org>99 * Based on dummy.c by Jaroslav Kysela <perex@perex.cz>1010 *···103103104104MODULE_DESCRIPTION("ALSA driver module for cx2388x based TV cards");105105MODULE_AUTHOR("Ricardo Cerqueira");106106-MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");106106+MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@kernel.org>");107107MODULE_LICENSE("GPL");108108MODULE_VERSION(CX88_VERSION);109109
···44 * Copyright 1997 M. Kirkwood55 *66 * Converted to the radio-isa framework by Hans Verkuil <hans.verkuil@cisco.com>77- * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@infradead.org>77+ * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@kernel.org>88 * Converted to new API by Alan Cox <alan@lxorguk.ukuu.org.uk>99 * Various bugfixes and enhancements by Russell Kroll <rkroll@exploits.org>1010 *
+1-1
drivers/media/radio/radio-aztech.c
···22 * radio-aztech.c - Aztech radio card driver33 *44 * Converted to the radio-isa framework by Hans Verkuil <hans.verkuil@xs4all.nl>55- * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@infradead.org>55+ * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@kernel.org>66 * Adapted to support the Video for Linux API by77 * Russell Kroll <rkroll@exploits.org>. Based on original tuner code by:88 *
+1-1
drivers/media/radio/radio-gemtek.c
···1515 * Various bugfixes and enhancements by Russell Kroll <rkroll@exploits.org>1616 *1717 * Converted to the radio-isa framework by Hans Verkuil <hans.verkuil@cisco.com>1818- * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@infradead.org>1818+ * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@kernel.org>1919 *2020 * Note: this card seems to swap the left and right audio channels!2121 *
+1-1
drivers/media/radio/radio-maxiradio.c
···2727 * BUGS:2828 * - card unmutes if you change frequency2929 *3030- * (c) 2006, 2007 by Mauro Carvalho Chehab <mchehab@infradead.org>:3030+ * (c) 2006, 2007 by Mauro Carvalho Chehab <mchehab@kernel.org>:3131 * - Conversion to V4L2 API3232 * - Uses video_ioctl2 for parsing and to add debug support3333 */
+1-1
drivers/media/radio/radio-rtrack2.c
···77 * Various bugfixes and enhancements by Russell Kroll <rkroll@exploits.org>88 *99 * Converted to the radio-isa framework by Hans Verkuil <hans.verkuil@cisco.com>1010- * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@infradead.org>1010+ * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@kernel.org>1111 *1212 * Fully tested with actual hardware and the v4l2-compliance tool.1313 */
+1-1
drivers/media/radio/radio-sf16fmi.c
···1313 * No volume control - only mute/unmute - you have to use line volume1414 * control on SB-part of SF16-FMI/SF16-FMP/SF16-FMD1515 *1616- * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@infradead.org>1616+ * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@kernel.org>1717 */18181919#include <linux/kernel.h> /* __setup */
+1-1
drivers/media/radio/radio-terratec.c
···1717 * Volume Control is done digitally1818 *1919 * Converted to the radio-isa framework by Hans Verkuil <hans.verkuil@cisco.com>2020- * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@infradead.org>2020+ * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@kernel.org>2121 */22222323#include <linux/module.h> /* Modules */
+1-1
drivers/media/radio/radio-trust.c
···1212 * Scott McGrath (smcgrath@twilight.vtc.vsc.edu)1313 * William McGrath (wmcgrath@twilight.vtc.vsc.edu)1414 *1515- * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@infradead.org>1515+ * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@kernel.org>1616 */17171818#include <stdarg.h>
+1-1
drivers/media/radio/radio-typhoon.c
···2525 * The frequency change is necessary since the card never seems to be2626 * completely silent.2727 *2828- * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@infradead.org>2828+ * Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@kernel.org>2929 */30303131#include <linux/module.h> /* Modules */
+1-1
drivers/media/radio/radio-zoltrix.c
···2727 * 2002-07-15 - Fix Stereo typo2828 *2929 * 2006-07-24 - Converted to V4L2 API3030- * by Mauro Carvalho Chehab <mchehab@infradead.org>3030+ * by Mauro Carvalho Chehab <mchehab@kernel.org>3131 *3232 * Converted to the radio-isa framework by Hans Verkuil <hans.verkuil@cisco.com>3333 *
+1-1
drivers/media/rc/keymaps/rc-avermedia-m135a.c
···1212 *1313 * On Avermedia M135A with IR model RM-JX, the same codes exist on both1414 * Positivo (BR) and original IR, initial version and remote control codes1515- * added by Mauro Carvalho Chehab <mchehab@infradead.org>1515+ * added by Mauro Carvalho Chehab <mchehab@kernel.org>1616 *1717 * Positivo also ships Avermedia M135A with model RM-K6, extra control1818 * codes added by Herton Ronaldo Krzesinski <herton@mandriva.com.br>
···22// For Philips TEA5761 FM Chip33// I2C address is always 0x20 (0x10 at 7-bit mode).44//55-// Copyright (c) 2005-2007 Mauro Carvalho Chehab (mchehab@infradead.org)55+// Copyright (c) 2005-2007 Mauro Carvalho Chehab <mchehab@kernel.org>6677#include <linux/i2c.h>88#include <linux/slab.h>···337337EXPORT_SYMBOL_GPL(tea5761_autodetection);338338339339MODULE_DESCRIPTION("Philips TEA5761 FM tuner driver");340340-MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");340340+MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@kernel.org>");341341MODULE_LICENSE("GPL v2");
+2-2
drivers/media/tuners/tea5767.c
···22// For Philips TEA5767 FM Chip used on some TV Cards like Prolink Pixelview33// I2C address is always 0xC0.44//55-// Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@infradead.org)55+// Copyright (c) 2005 Mauro Carvalho Chehab <mchehab@kernel.org>66//77// tea5767 autodetection thanks to Torsten Seeboth and Atsushi Nakagawa88// from their contributions on DScaler.···469469EXPORT_SYMBOL_GPL(tea5767_autodetection);470470471471MODULE_DESCRIPTION("Philips TEA5767 FM tuner driver");472472-MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");472472+MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@kernel.org>");473473MODULE_LICENSE("GPL v2");
+1-1
drivers/media/tuners/tuner-xc2028-types.h
···55 * This file includes internal tipes to be used inside tuner-xc2028.66 * Shouldn't be included outside tuner-xc202877 *88- * Copyright (c) 2007-2008 Mauro Carvalho Chehab (mchehab@infradead.org)88+ * Copyright (c) 2007-2008 Mauro Carvalho Chehab <mchehab@kernel.org>99 */10101111/* xc3028 firmware types */
···22//33// em28xx-camera.c - driver for Empia EM25xx/27xx/28xx USB video capture devices44//55-// Copyright (C) 2009 Mauro Carvalho Chehab <mchehab@infradead.org>55+// Copyright (C) 2009 Mauro Carvalho Chehab <mchehab@kernel.org>66// Copyright (C) 2013 Frank Schäfer <fschaefer.oss@googlemail.com>77//88// This program is free software; you can redistribute it and/or modify
+1-1
drivers/media/usb/em28xx/em28xx-cards.c
···55//66// Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it>77// Markus Rechberger <mrechberger@gmail.com>88-// Mauro Carvalho Chehab <mchehab@infradead.org>88+// Mauro Carvalho Chehab <mchehab@kernel.org>99// Sascha Sommer <saschasommer@freenet.de>1010// Copyright (C) 2012 Frank Schäfer <fschaefer.oss@googlemail.com>1111//
···22//33// DVB device driver for em28xx44//55-// (c) 2008-2011 Mauro Carvalho Chehab <mchehab@infradead.org>55+// (c) 2008-2011 Mauro Carvalho Chehab <mchehab@kernel.org>66//77// (c) 2008 Devin Heitmueller <devin.heitmueller@gmail.com>88// - Fixes for the driver to properly work with HVR-950···6363#include "tc90522.h"6464#include "qm1d1c0042.h"65656666-MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");6666+MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@kernel.org>");6767MODULE_LICENSE("GPL v2");6868MODULE_DESCRIPTION(DRIVER_DESC " - digital TV interface");6969MODULE_VERSION(EM28XX_VERSION);
+1-1
drivers/media/usb/em28xx/em28xx-i2c.c
···44//55// Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it>66// Markus Rechberger <mrechberger@gmail.com>77-// Mauro Carvalho Chehab <mchehab@infradead.org>77+// Mauro Carvalho Chehab <mchehab@kernel.org>88// Sascha Sommer <saschasommer@freenet.de>99// Copyright (C) 2013 Frank Schäfer <fschaefer.oss@googlemail.com>1010//
+1-1
drivers/media/usb/em28xx/em28xx-input.c
···44//55// Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it>66// Markus Rechberger <mrechberger@gmail.com>77-// Mauro Carvalho Chehab <mchehab@infradead.org>77+// Mauro Carvalho Chehab <mchehab@kernel.org>88// Sascha Sommer <saschasommer@freenet.de>99//1010// This program is free software; you can redistribute it and/or modify
+2-2
drivers/media/usb/em28xx/em28xx-video.c
···55//66// Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it>77// Markus Rechberger <mrechberger@gmail.com>88-// Mauro Carvalho Chehab <mchehab@infradead.org>88+// Mauro Carvalho Chehab <mchehab@kernel.org>99// Sascha Sommer <saschasommer@freenet.de>1010// Copyright (C) 2012 Frank Schäfer <fschaefer.oss@googlemail.com>1111//···44444545#define DRIVER_AUTHOR "Ludovico Cavedon <cavedon@sssup.it>, " \4646 "Markus Rechberger <mrechberger@gmail.com>, " \4747- "Mauro Carvalho Chehab <mchehab@infradead.org>, " \4747+ "Mauro Carvalho Chehab <mchehab@kernel.org>, " \4848 "Sascha Sommer <saschasommer@freenet.de>"49495050static unsigned int isoc_debug;
+1-1
drivers/media/usb/em28xx/em28xx.h
···44 *55 * Copyright (C) 2005 Markus Rechberger <mrechberger@gmail.com>66 * Ludovico Cavedon <cavedon@sssup.it>77- * Mauro Carvalho Chehab <mchehab@infradead.org>77+ * Mauro Carvalho Chehab <mchehab@kernel.org>88 * Copyright (C) 2012 Frank Schäfer <fschaefer.oss@googlemail.com>99 *1010 * Based on the em2800 driver from Sascha Sommer <saschasommer@freenet.de>
+1-1
drivers/media/usb/gspca/zc3xx-reg.h
···11/*22 * zc030x registers33 *44- * Copyright (c) 2008 Mauro Carvalho Chehab <mchehab@infradead.org>44+ * Copyright (c) 2008 Mauro Carvalho Chehab <mchehab@kernel.org>55 *66 * The register aliases used here came from this driver:77 * http://zc0302.sourceforge.net/zc0302.php
+1-1
drivers/media/usb/tm6000/tm6000-cards.c
···11// SPDX-License-Identifier: GPL-2.022// tm6000-cards.c - driver for TM5600/TM6000/TM6010 USB video capture devices33//44-// Copyright (c) 2006-2007 Mauro Carvalho Chehab <mchehab@infradead.org>44+// Copyright (c) 2006-2007 Mauro Carvalho Chehab <mchehab@kernel.org>5566#include <linux/init.h>77#include <linux/module.h>
+1-1
drivers/media/usb/tm6000/tm6000-core.c
···11// SPDX-License-Identifier: GPL-2.022// tm6000-core.c - driver for TM5600/TM6000/TM6010 USB video capture devices33//44-// Copyright (c) 2006-2007 Mauro Carvalho Chehab <mchehab@infradead.org>44+// Copyright (c) 2006-2007 Mauro Carvalho Chehab <mchehab@kernel.org>55//66// Copyright (c) 2007 Michel Ludwig <michel.ludwig@gmail.com>77// - DVB-T support
+1-1
drivers/media/usb/tm6000/tm6000-i2c.c
···11// SPDX-License-Identifier: GPL-2.022// tm6000-i2c.c - driver for TM5600/TM6000/TM6010 USB video capture devices33//44-// Copyright (c) 2006-2007 Mauro Carvalho Chehab <mchehab@infradead.org>44+// Copyright (c) 2006-2007 Mauro Carvalho Chehab <mchehab@kernel.org>55//66// Copyright (c) 2007 Michel Ludwig <michel.ludwig@gmail.com>77// - Fix SMBus Read Byte command
···11// SPDX-License-Identifier: GPL-2.022// tm6000-video.c - driver for TM5600/TM6000/TM6010 USB video capture devices33//44-// Copyright (c) 2006-2007 Mauro Carvalho Chehab <mchehab@infradead.org>44+// Copyright (c) 2006-2007 Mauro Carvalho Chehab <mchehab@kernel.org>55//66// Copyright (c) 2007 Michel Ludwig <michel.ludwig@gmail.com>77// - Fixed module load/unload
+1-1
drivers/media/usb/tm6000/tm6000.h
···22 * SPDX-License-Identifier: GPL-2.033 * tm6000.h - driver for TM5600/TM6000/TM6010 USB video capture devices44 *55- * Copyright (c) 2006-2007 Mauro Carvalho Chehab <mchehab@infradead.org>55+ * Copyright (c) 2006-2007 Mauro Carvalho Chehab <mchehab@kernel.org>66 *77 * Copyright (c) 2007 Michel Ludwig <michel.ludwig@gmail.com>88 * - DVB-T support
+2-2
drivers/media/v4l2-core/v4l2-dev.c
···1010 * 2 of the License, or (at your option) any later version.1111 *1212 * Authors: Alan Cox, <alan@lxorguk.ukuu.org.uk> (version 1)1313- * Mauro Carvalho Chehab <mchehab@infradead.org> (version 2)1313+ * Mauro Carvalho Chehab <mchehab@kernel.org> (version 2)1414 *1515 * Fixes: 20000516 Claudio Matsuoka <claudio@conectiva.com>1616 * - Added procfs support···10721072subsys_initcall(videodev_init);10731073module_exit(videodev_exit)1074107410751075-MODULE_AUTHOR("Alan Cox, Mauro Carvalho Chehab <mchehab@infradead.org>");10751075+MODULE_AUTHOR("Alan Cox, Mauro Carvalho Chehab <mchehab@kernel.org>");10761076MODULE_DESCRIPTION("Device registrar for Video4Linux drivers v2");10771077MODULE_LICENSE("GPL");10781078MODULE_ALIAS_CHARDEV_MAJOR(VIDEO_MAJOR);
+1-1
drivers/media/v4l2-core/v4l2-ioctl.c
···99 * 2 of the License, or (at your option) any later version.1010 *1111 * Authors: Alan Cox, <alan@lxorguk.ukuu.org.uk> (version 1)1212- * Mauro Carvalho Chehab <mchehab@infradead.org> (version 2)1212+ * Mauro Carvalho Chehab <mchehab@kernel.org> (version 2)1313 */14141515#include <linux/mm.h>
+3-3
drivers/media/v4l2-core/videobuf-core.c
···11/*22 * generic helper functions for handling video4linux capture buffers33 *44- * (c) 2007 Mauro Carvalho Chehab, <mchehab@infradead.org>44+ * (c) 2007 Mauro Carvalho Chehab, <mchehab@kernel.org>55 *66 * Highly based on video-buf written originally by:77 * (c) 2001,02 Gerd Knorr <kraxel@bytesex.org>88- * (c) 2006 Mauro Carvalho Chehab, <mchehab@infradead.org>88+ * (c) 2006 Mauro Carvalho Chehab, <mchehab@kernel.org>99 * (c) 2006 Ted Walther and John Sokol1010 *1111 * This program is free software; you can redistribute it and/or modify···3838module_param(debug, int, 0644);39394040MODULE_DESCRIPTION("helper module to manage video4linux buffers");4141-MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");4141+MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@kernel.org>");4242MODULE_LICENSE("GPL");43434444#define dprintk(level, fmt, arg...) \
+1-1
drivers/media/v4l2-core/videobuf-dma-contig.c
···77 * Copyright (c) 2008 Magnus Damm88 *99 * Based on videobuf-vmalloc.c,1010- * (c) 2007 Mauro Carvalho Chehab, <mchehab@infradead.org>1010+ * (c) 2007 Mauro Carvalho Chehab, <mchehab@kernel.org>1111 *1212 * This program is free software; you can redistribute it and/or modify1313 * it under the terms of the GNU General Public License as published by
+3-3
drivers/media/v4l2-core/videobuf-dma-sg.c
···66 * into PAGE_SIZE chunks). They also assume the driver does not need77 * to touch the video data.88 *99- * (c) 2007 Mauro Carvalho Chehab, <mchehab@infradead.org>99+ * (c) 2007 Mauro Carvalho Chehab, <mchehab@kernel.org>1010 *1111 * Highly based on video-buf written originally by:1212 * (c) 2001,02 Gerd Knorr <kraxel@bytesex.org>1313- * (c) 2006 Mauro Carvalho Chehab, <mchehab@infradead.org>1313+ * (c) 2006 Mauro Carvalho Chehab, <mchehab@kernel.org>1414 * (c) 2006 Ted Walther and John Sokol1515 *1616 * This program is free software; you can redistribute it and/or modify···4848module_param(debug, int, 0644);49495050MODULE_DESCRIPTION("helper module to manage video4linux dma sg buffers");5151-MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");5151+MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@kernel.org>");5252MODULE_LICENSE("GPL");53535454#define dprintk(level, fmt, arg...) \
+2-2
drivers/media/v4l2-core/videobuf-vmalloc.c
···66 * into PAGE_SIZE chunks). They also assume the driver does not need77 * to touch the video data.88 *99- * (c) 2007 Mauro Carvalho Chehab, <mchehab@infradead.org>99+ * (c) 2007 Mauro Carvalho Chehab, <mchehab@kernel.org>1010 *1111 * This program is free software; you can redistribute it and/or modify1212 * it under the terms of the GNU General Public License as published by···4141module_param(debug, int, 0644);42424343MODULE_DESCRIPTION("helper module to manage video4linux vmalloc buffers");4444-MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");4444+MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@kernel.org>");4545MODULE_LICENSE("GPL");46464747#define dprintk(level, fmt, arg...) \
+13-5
drivers/net/ethernet/broadcom/bcmsysport.c
···21442144 .ndo_select_queue = bcm_sysport_select_queue,21452145};2146214621472147-static int bcm_sysport_map_queues(struct net_device *dev,21472147+static int bcm_sysport_map_queues(struct notifier_block *nb,21482148 struct dsa_notifier_register_info *info)21492149{21502150- struct bcm_sysport_priv *priv = netdev_priv(dev);21512150 struct bcm_sysport_tx_ring *ring;21512151+ struct bcm_sysport_priv *priv;21522152 struct net_device *slave_dev;21532153 unsigned int num_tx_queues;21542154 unsigned int q, start, port;21552155+ struct net_device *dev;21562156+21572157+ priv = container_of(nb, struct bcm_sysport_priv, dsa_notifier);21582158+ if (priv->netdev != info->master)21592159+ return 0;21602160+21612161+ dev = info->master;2155216221562163 /* We can't be setting up queue inspection for non directly attached21572164 * switches···21812174 if (priv->is_lite)21822175 netif_set_real_num_tx_queues(slave_dev,21832176 slave_dev->num_tx_queues / 2);21772177+21842178 num_tx_queues = slave_dev->real_num_tx_queues;2185217921862180 if (priv->per_port_num_tx_queues &&21872181 priv->per_port_num_tx_queues != num_tx_queues)21882188- netdev_warn(slave_dev, "asymetric number of per-port queues\n");21822182+ netdev_warn(slave_dev, "asymmetric number of per-port queues\n");2189218321902184 priv->per_port_num_tx_queues = num_tx_queues;21912185···22092201 return 0;22102202}2211220322122212-static int bcm_sysport_dsa_notifier(struct notifier_block *unused,22042204+static int bcm_sysport_dsa_notifier(struct notifier_block *nb,22132205 unsigned long event, void *ptr)22142206{22152207 struct dsa_notifier_register_info *info;···2219221122202212 info = ptr;2221221322222222- return notifier_from_errno(bcm_sysport_map_queues(info->master, info));22142214+ return notifier_from_errno(bcm_sysport_map_queues(nb, info));22232215}2224221622252217#define REV_FMT "v%2x.%02x"
···1007100710081008 mutex_lock(&priv->state_lock);1009100910101010- if (!test_bit(MLX5E_STATE_OPENED, &priv->state))10111011- goto out;10121012-10131010 new_channels.params = priv->channels.params;10141011 mlx5e_trust_update_tx_min_inline_mode(priv, &new_channels.params);10121012+10131013+ if (!test_bit(MLX5E_STATE_OPENED, &priv->state)) {10141014+ priv->channels.params = new_channels.params;10151015+ goto out;10161016+ }1015101710161018 /* Skip if tx_min_inline is the same */10171019 if (new_channels.params.tx_min_inline_mode ==
···290290291291 if (!test_bit(MLX5E_STATE_OPENED, &priv->state)) {292292 netdev_err(priv->netdev,293293- "\tCan't perform loobpack test while device is down\n");293293+ "\tCan't perform loopback test while device is down\n");294294 return -ENODEV;295295 }296296
+2-1
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
···18641864 }1865186518661866 ip_proto = MLX5_GET(fte_match_set_lyr_2_4, headers_v, ip_protocol);18671867- if (modify_ip_header && ip_proto != IPPROTO_TCP && ip_proto != IPPROTO_UDP) {18671867+ if (modify_ip_header && ip_proto != IPPROTO_TCP &&18681868+ ip_proto != IPPROTO_UDP && ip_proto != IPPROTO_ICMP) {18681869 pr_info("can't offload re-write of ip proto %d\n", ip_proto);18691870 return false;18701871 }
···17181718 struct net_device *dev = mlxsw_sp_port->dev;17191719 int err;1720172017211721- if (bridge_port->bridge_device->multicast_enabled) {17221722- if (bridge_port->bridge_device->multicast_enabled) {17231723- err = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid,17241724- false);17251725- if (err)17261726- netdev_err(dev, "Unable to remove port from SMID\n");17271727- }17211721+ if (bridge_port->bridge_device->multicast_enabled &&17221722+ !bridge_port->mrouter) {17231723+ err = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid, false);17241724+ if (err)17251725+ netdev_err(dev, "Unable to remove port from SMID\n");17281726 }1729172717301728 err = mlxsw_sp_port_remove_from_mid(mlxsw_sp_port, mid);
···6767/**6868 * nfp_net_get_mac_addr() - Get the MAC address.6969 * @pf: NFP PF handle7070+ * @netdev: net_device to set MAC address on7071 * @port: NFP port structure7172 *7273 * First try to get the MAC address from NSP ETH table. If that7374 * fails generate a random address.7475 */7575-void nfp_net_get_mac_addr(struct nfp_pf *pf, struct nfp_port *port)7676+void7777+nfp_net_get_mac_addr(struct nfp_pf *pf, struct net_device *netdev,7878+ struct nfp_port *port)7679{7780 struct nfp_eth_table_port *eth_port;78817982 eth_port = __nfp_port_get_eth_port(port);8083 if (!eth_port) {8181- eth_hw_addr_random(port->netdev);8484+ eth_hw_addr_random(netdev);8285 return;8386 }84878585- ether_addr_copy(port->netdev->dev_addr, eth_port->mac_addr);8686- ether_addr_copy(port->netdev->perm_addr, eth_port->mac_addr);8888+ ether_addr_copy(netdev->dev_addr, eth_port->mac_addr);8989+ ether_addr_copy(netdev->perm_addr, eth_port->mac_addr);8790}88918992static struct nfp_eth_table_port *···514511 return PTR_ERR(mem);515512 }516513517517- min_size = NFP_MAC_STATS_SIZE * (pf->eth_tbl->max_index + 1);518518- pf->mac_stats_mem = nfp_rtsym_map(pf->rtbl, "_mac_stats",519519- "net.macstats", min_size,520520- &pf->mac_stats_bar);521521- if (IS_ERR(pf->mac_stats_mem)) {522522- if (PTR_ERR(pf->mac_stats_mem) != -ENOENT) {523523- err = PTR_ERR(pf->mac_stats_mem);524524- goto err_unmap_ctrl;514514+ if (pf->eth_tbl) {515515+ min_size = NFP_MAC_STATS_SIZE * (pf->eth_tbl->max_index + 1);516516+ pf->mac_stats_mem = nfp_rtsym_map(pf->rtbl, "_mac_stats",517517+ "net.macstats", min_size,518518+ &pf->mac_stats_bar);519519+ if (IS_ERR(pf->mac_stats_mem)) {520520+ if (PTR_ERR(pf->mac_stats_mem) != -ENOENT) {521521+ err = PTR_ERR(pf->mac_stats_mem);522522+ goto err_unmap_ctrl;523523+ }524524+ pf->mac_stats_mem = NULL;525525 }526526- pf->mac_stats_mem = NULL;527526 }528527529528 pf->vf_cfg_mem = nfp_net_pf_map_rtsym(pf, "net.vfcfg",
+1-1
drivers/net/ethernet/qlogic/qed/qed_ll2.c
···23702370 u8 flags = 0;2371237123722372 if (unlikely(skb->ip_summed != CHECKSUM_NONE)) {23732373- DP_INFO(cdev, "Cannot transmit a checksumed packet\n");23732373+ DP_INFO(cdev, "Cannot transmit a checksummed packet\n");23742374 return -EINVAL;23752375 }23762376
+1-1
drivers/net/ethernet/qlogic/qed/qed_roce.c
···848848849849 if (!(qp->resp_offloaded)) {850850 DP_NOTICE(p_hwfn,851851- "The responder's qp should be offloded before requester's\n");851851+ "The responder's qp should be offloaded before requester's\n");852852 return -EINVAL;853853 }854854
···47844784 * will set rule->filter_id to EFX_ARFS_FILTER_ID_PENDING, meaning that47854785 * the rule is not removed by efx_rps_hash_del() below.47864786 */47874787- ret = efx_ef10_filter_remove_internal(efx, 1U << spec->priority,47884788- filter_idx, true) == 0;47874787+ if (ret)47884788+ ret = efx_ef10_filter_remove_internal(efx, 1U << spec->priority,47894789+ filter_idx, true) == 0;47894790 /* While we can't safely dereference rule (we dropped the lock), we can47904791 * still test it for NULL.47914792 */
+2
drivers/net/ethernet/sfc/rx.c
···839839 int rc;840840841841 rc = efx->type->filter_insert(efx, &req->spec, true);842842+ if (rc >= 0)843843+ rc %= efx->type->max_rx_ip_filters;842844 if (efx->rps_hash_table) {843845 spin_lock_bh(&efx->rps_hash_lock);844846 rule = efx_rps_hash_find(efx, &req->spec);
···535535536536 /* Grab the bits from PHYIR1, and put them in the upper half */537537 phy_reg = mdiobus_read(bus, addr, MII_PHYSID1);538538- if (phy_reg < 0)538538+ if (phy_reg < 0) {539539+ /* if there is no device, return without an error so scanning540540+ * the bus works properly541541+ */542542+ if (phy_reg == -EIO || phy_reg == -ENODEV) {543543+ *phy_id = 0xffffffff;544544+ return 0;545545+ }546546+539547 return -EIO;548548+ }540549541550 *phy_id = (phy_reg & 0xffff) << 16;542551
+13
drivers/net/usb/qmi_wwan.c
···10981098 {QMI_FIXED_INTF(0x05c6, 0x9080, 8)},10991099 {QMI_FIXED_INTF(0x05c6, 0x9083, 3)},11001100 {QMI_FIXED_INTF(0x05c6, 0x9084, 4)},11011101+ {QMI_FIXED_INTF(0x05c6, 0x90b2, 3)}, /* ublox R410M */11011102 {QMI_FIXED_INTF(0x05c6, 0x920d, 0)},11021103 {QMI_FIXED_INTF(0x05c6, 0x920d, 5)},11031104 {QMI_QUIRK_SET_DTR(0x05c6, 0x9625, 4)}, /* YUGA CLM920-NC5 */···13421341 if (!id->driver_info) {13431342 dev_dbg(&intf->dev, "setting defaults for dynamic device id\n");13441343 id->driver_info = (unsigned long)&qmi_wwan_info;13441344+ }13451345+13461346+ /* There are devices where the same interface number can be13471347+ * configured as different functions. We should only bind to13481348+ * vendor specific functions when matching on interface number13491349+ */13501350+ if (id->match_flags & USB_DEVICE_ID_MATCH_INT_NUMBER &&13511351+ desc->bInterfaceClass != USB_CLASS_VENDOR_SPEC) {13521352+ dev_dbg(&intf->dev,13531353+ "Rejecting interface number match for class %02x\n",13541354+ desc->bInterfaceClass);13551355+ return -ENODEV;13451356 }1346135713471358 /* Quectel EC20 quirk where we've QMI on interface 4 instead of 0 */
···101101 *102102 * This function parses the regulatory channel data received as a103103 * MCC_UPDATE_CMD command. It returns a newly allocation regulatory domain,104104- * to be fed into the regulatory core. An ERR_PTR is returned on error.104104+ * to be fed into the regulatory core. In case the geo_info is set handle105105+ * accordingly. An ERR_PTR is returned on error.105106 * If not given to the regulatory core, the user is responsible for freeing106107 * the regdomain returned here with kfree.107108 */108109struct ieee80211_regdomain *109110iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,110110- int num_of_ch, __le32 *channels, u16 fw_mcc);111111+ int num_of_ch, __le32 *channels, u16 fw_mcc,112112+ u16 geo_info);111113112114#endif /* __iwl_nvm_parse_h__ */
+2-1
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
···311311 regd = iwl_parse_nvm_mcc_info(mvm->trans->dev, mvm->cfg,312312 __le32_to_cpu(resp->n_channels),313313 resp->channels,314314- __le16_to_cpu(resp->mcc));314314+ __le16_to_cpu(resp->mcc),315315+ __le16_to_cpu(resp->geo_info));315316 /* Store the return source id */316317 src_id = resp->source_id;317318 kfree(resp);
···27272828config NVME_RDMA2929 tristate "NVM Express over Fabrics RDMA host driver"3030- depends on INFINIBAND && BLOCK3030+ depends on INFINIBAND && INFINIBAND_ADDR_TRANS && BLOCK3131 select NVME_CORE3232 select NVME_FABRICS3333 select SG_POOL
+2-25
drivers/nvme/host/core.c
···764764 ret = PTR_ERR(meta);765765 goto out_unmap;766766 }767767+ req->cmd_flags |= REQ_INTEGRITY;767768 }768769 }769770···29982997 if (nvme_init_ns_head(ns, nsid, id))29992998 goto out_free_id;30002999 nvme_setup_streams_ns(ctrl, ns);30013001-30023002-#ifdef CONFIG_NVME_MULTIPATH30033003- /*30043004- * If multipathing is enabled we need to always use the subsystem30053005- * instance number for numbering our devices to avoid conflicts30063006- * between subsystems that have multiple controllers and thus use30073007- * the multipath-aware subsystem node and those that have a single30083008- * controller and use the controller node directly.30093009- */30103010- if (ns->head->disk) {30113011- sprintf(disk_name, "nvme%dc%dn%d", ctrl->subsys->instance,30123012- ctrl->cntlid, ns->head->instance);30133013- flags = GENHD_FL_HIDDEN;30143014- } else {30153015- sprintf(disk_name, "nvme%dn%d", ctrl->subsys->instance,30163016- ns->head->instance);30173017- }30183018-#else30193019- /*30203020- * But without the multipath code enabled, multiple controller per30213021- * subsystems are visible as devices and thus we cannot use the30223022- * subsystem instance.30233023- */30243024- sprintf(disk_name, "nvme%dn%d", ctrl->instance, ns->head->instance);30253025-#endif30003000+ nvme_set_disk_name(disk_name, ns, ctrl, &flags);3026300130273002 if ((ctrl->quirks & NVME_QUIRK_LIGHTNVM) && id->vs[0] == 0x1) {30283003 if (nvme_nvm_register(ns, disk_name, node)) {
···1515#include "nvme.h"16161717static bool multipath = true;1818-module_param(multipath, bool, 0644);1818+module_param(multipath, bool, 0444);1919MODULE_PARM_DESC(multipath,2020 "turn on native support for multiple controllers per subsystem");2121+2222+/*2323+ * If multipathing is enabled we need to always use the subsystem instance2424+ * number for numbering our devices to avoid conflicts between subsystems that2525+ * have multiple controllers and thus use the multipath-aware subsystem node2626+ * and those that have a single controller and use the controller node2727+ * directly.2828+ */2929+void nvme_set_disk_name(char *disk_name, struct nvme_ns *ns,3030+ struct nvme_ctrl *ctrl, int *flags)3131+{3232+ if (!multipath) {3333+ sprintf(disk_name, "nvme%dn%d", ctrl->instance, ns->head->instance);3434+ } else if (ns->head->disk) {3535+ sprintf(disk_name, "nvme%dc%dn%d", ctrl->subsys->instance,3636+ ctrl->cntlid, ns->head->instance);3737+ *flags = GENHD_FL_HIDDEN;3838+ } else {3939+ sprintf(disk_name, "nvme%dn%d", ctrl->subsys->instance,4040+ ns->head->instance);4141+ }4242+}21432244void nvme_failover_req(struct request *req)2345{
+12
drivers/nvme/host/nvme.h
···436436extern const struct block_device_operations nvme_ns_head_ops;437437438438#ifdef CONFIG_NVME_MULTIPATH439439+void nvme_set_disk_name(char *disk_name, struct nvme_ns *ns,440440+ struct nvme_ctrl *ctrl, int *flags);439441void nvme_failover_req(struct request *req);440442bool nvme_req_needs_failover(struct request *req, blk_status_t error);441443void nvme_kick_requeue_lists(struct nvme_ctrl *ctrl);···463461}464462465463#else464464+/*465465+ * Without the multipath code enabled, multiple controller per subsystems are466466+ * visible as devices and thus we cannot use the subsystem instance.467467+ */468468+static inline void nvme_set_disk_name(char *disk_name, struct nvme_ns *ns,469469+ struct nvme_ctrl *ctrl, int *flags)470470+{471471+ sprintf(disk_name, "nvme%dn%d", ctrl->instance, ns->head->instance);472472+}473473+466474static inline void nvme_failover_req(struct request *req)467475{468476}
+1-1
drivers/nvme/target/Kconfig
···27272828config NVME_TARGET_RDMA2929 tristate "NVMe over Fabrics RDMA target support"3030- depends on INFINIBAND3030+ depends on INFINIBAND && INFINIBAND_ADDR_TRANS3131 depends on NVME_TARGET3232 select SGL_ALLOC3333 help
+6
drivers/nvme/target/loop.c
···469469 nvme_stop_ctrl(&ctrl->ctrl);470470 nvme_loop_shutdown_ctrl(ctrl);471471472472+ if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {473473+ /* state change failure should never happen */474474+ WARN_ON_ONCE(1);475475+ return;476476+ }477477+472478 ret = nvme_loop_configure_admin_queue(ctrl);473479 if (ret)474480 goto out_disable;
+1-1
drivers/parisc/ccio-dma.c
···12631263 * I/O Page Directory, the resource map, and initalizing the12641264 * U2/Uturn chip into virtual mode.12651265 */12661266-static void12661266+static void __init12671267ccio_ioc_init(struct ioc *ioc)12681268{12691269 int i;
+1-1
drivers/platform/x86/Kconfig
···154154 depends on ACPI_VIDEO || ACPI_VIDEO = n155155 depends on RFKILL || RFKILL = n156156 depends on SERIO_I8042157157- select DELL_SMBIOS157157+ depends on DELL_SMBIOS158158 select POWER_SUPPLY159159 select LEDS_CLASS160160 select NEW_LEDS
+3-1
drivers/platform/x86/asus-wireless.c
···178178{179179 struct asus_wireless_data *data = acpi_driver_data(adev);180180181181- if (data->wq)181181+ if (data->wq) {182182+ devm_led_classdev_unregister(&adev->dev, &data->led);182183 destroy_workqueue(data->wq);184184+ }183185 return 0;184186}185187
···33 *44 * This program is free software: you can redistribute it and/or modify55 * it under the terms of the GNU General Public License as published by66- * the Free Software Foundation, either version 3 of the License, or66+ * the Free Software Foundation, either version 2 of the License, or77 * (at your option) any later version.88 *99 * This program is distributed in the hope that it will be useful,
+1-2
drivers/scsi/isci/port_config.c
···291291 * Note: We have not moved the current phy_index so we will actually292292 * compare the startting phy with itself.293293 * This is expected and required to add the phy to the port. */294294- while (phy_index < SCI_MAX_PHYS) {294294+ for (; phy_index < SCI_MAX_PHYS; phy_index++) {295295 if ((phy_mask & (1 << phy_index)) == 0)296296 continue;297297 sci_phy_get_sas_address(&ihost->phys[phy_index],···311311 &ihost->phys[phy_index]);312312313313 assigned_phy_mask |= (1 << phy_index);314314- phy_index++;315314 }316315317316 }
+5-2
drivers/scsi/storvsc_drv.c
···17221722 max_targets = STORVSC_MAX_TARGETS;17231723 max_channels = STORVSC_MAX_CHANNELS;17241724 /*17251725- * On Windows8 and above, we support sub-channels for storage.17251725+ * On Windows8 and above, we support sub-channels for storage17261726+ * on SCSI and FC controllers.17261727 * The number of sub-channels offerred is based on the number of17271728 * VCPUs in the guest.17281729 */17291729- max_sub_channels = (num_cpus / storvsc_vcpus_per_sub_channel);17301730+ if (!dev_is_ide)17311731+ max_sub_channels =17321732+ (num_cpus - 1) / storvsc_vcpus_per_sub_channel;17301733 }1731173417321735 scsi_driver.can_queue = (max_outstanding_req_per_channel *
+1-1
drivers/staging/media/imx/imx-media-csi.c
···17991799 priv->dev->of_node = pdata->of_node;18001800 pinctrl = devm_pinctrl_get_select_default(priv->dev);18011801 if (IS_ERR(pinctrl)) {18021802- ret = PTR_ERR(priv->vdev);18021802+ ret = PTR_ERR(pinctrl);18031803 dev_dbg(priv->dev,18041804 "devm_pinctrl_get_select_default() failed: %d\n", ret);18051805 if (ret != -ENODEV)
+4-4
drivers/target/target_core_iblock.c
···427427{428428 struct se_device *dev = cmd->se_dev;429429 struct scatterlist *sg = &cmd->t_data_sg[0];430430- unsigned char *buf, zero = 0x00, *p = &zero;431431- int rc, ret;430430+ unsigned char *buf, *not_zero;431431+ int ret;432432433433 buf = kmap(sg_page(sg)) + sg->offset;434434 if (!buf)···437437 * Fall back to block_execute_write_same() slow-path if438438 * incoming WRITE_SAME payload does not contain zeros.439439 */440440- rc = memcmp(buf, p, cmd->data_length);440440+ not_zero = memchr_inv(buf, 0x00, cmd->data_length);441441 kunmap(sg_page(sg));442442443443- if (rc)443443+ if (not_zero)444444 return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;445445446446 ret = blkdev_issue_zeroout(bdev,
+3-1
drivers/usb/core/config.c
···191191static const unsigned short high_speed_maxpacket_maxes[4] = {192192 [USB_ENDPOINT_XFER_CONTROL] = 64,193193 [USB_ENDPOINT_XFER_ISOC] = 1024,194194- [USB_ENDPOINT_XFER_BULK] = 512,194194+195195+ /* Bulk should be 512, but some devices use 1024: we will warn below */196196+ [USB_ENDPOINT_XFER_BULK] = 1024,195197 [USB_ENDPOINT_XFER_INT] = 1024,196198};197199static const unsigned short super_speed_maxpacket_maxes[4] = {
···39283928 if (index && !hs_ep->isochronous)39293929 epctrl |= DXEPCTL_SETD0PID;3930393039313931+ /* WA for Full speed ISOC IN in DDMA mode.39323932+ * By Clear NAK status of EP, core will send ZLP39333933+ * to IN token and assert NAK interrupt relying39343934+ * on TxFIFO status only39353935+ */39363936+39373937+ if (hsotg->gadget.speed == USB_SPEED_FULL &&39383938+ hs_ep->isochronous && dir_in) {39393939+ /* The WA applies only to core versions from 2.72a39403940+ * to 4.00a (including both). Also for FS_IOT_1.00a39413941+ * and HS_IOT_1.00a.39423942+ */39433943+ u32 gsnpsid = dwc2_readl(hsotg->regs + GSNPSID);39443944+39453945+ if ((gsnpsid >= DWC2_CORE_REV_2_72a &&39463946+ gsnpsid <= DWC2_CORE_REV_4_00a) ||39473947+ gsnpsid == DWC2_FS_IOT_REV_1_00a ||39483948+ gsnpsid == DWC2_HS_IOT_REV_1_00a)39493949+ epctrl |= DXEPCTL_CNAK;39503950+ }39513951+39313952 dev_dbg(hsotg->dev, "%s: write DxEPCTL=0x%08x\n",39323953 __func__, epctrl);39333954
+8-5
drivers/usb/dwc2/hcd.c
···358358359359static int dwc2_vbus_supply_init(struct dwc2_hsotg *hsotg)360360{361361+ int ret;362362+361363 hsotg->vbus_supply = devm_regulator_get_optional(hsotg->dev, "vbus");362362- if (IS_ERR(hsotg->vbus_supply))363363- return 0;364364+ if (IS_ERR(hsotg->vbus_supply)) {365365+ ret = PTR_ERR(hsotg->vbus_supply);366366+ hsotg->vbus_supply = NULL;367367+ return ret == -ENODEV ? 0 : ret;368368+ }364369365370 return regulator_enable(hsotg->vbus_supply);366371}···4347434243484343 spin_unlock_irqrestore(&hsotg->lock, flags);4349434443504350- dwc2_vbus_supply_init(hsotg);43514351-43524352- return 0;43454345+ return dwc2_vbus_supply_init(hsotg);43534346}4354434743554348/*
+3-1
drivers/usb/dwc2/pci.c
···141141 goto err;142142143143 glue = devm_kzalloc(dev, sizeof(*glue), GFP_KERNEL);144144- if (!glue)144144+ if (!glue) {145145+ ret = -ENOMEM;145146 goto err;147147+ }146148147149 ret = platform_device_add(dwc2);148150 if (ret) {
···990990 /* set tx_reinit and schedule the next qh */991991 ep->tx_reinit = 1;992992 }993993- musb_start_urb(musb, is_in, next_qh);993993+994994+ if (next_qh)995995+ musb_start_urb(musb, is_in, next_qh);994996 }995997}996998
+5
drivers/usb/serial/option.c
···233233/* These Quectel products use Qualcomm's vendor ID */234234#define QUECTEL_PRODUCT_UC20 0x9003235235#define QUECTEL_PRODUCT_UC15 0x9090236236+/* These u-blox products use Qualcomm's vendor ID */237237+#define UBLOX_PRODUCT_R410M 0x90b2236238/* These Yuga products use Qualcomm's vendor ID */237239#define YUGA_PRODUCT_CLM920_NC5 0x9625238240···10671065 /* Yuga products use Qualcomm vendor ID */10681066 { USB_DEVICE(QUALCOMM_VENDOR_ID, YUGA_PRODUCT_CLM920_NC5),10691067 .driver_info = RSVD(1) | RSVD(4) },10681068+ /* u-blox products using Qualcomm vendor ID */10691069+ { USB_DEVICE(QUALCOMM_VENDOR_ID, UBLOX_PRODUCT_R410M),10701070+ .driver_info = RSVD(1) | RSVD(3) },10701071 /* Quectel products using Quectel vendor ID */10711072 { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21),10721073 .driver_info = RSVD(4) },
+35-34
drivers/usb/serial/visor.c
···335335 goto exit;336336 }337337338338- if (retval == sizeof(*connection_info)) {339339- connection_info = (struct visor_connection_info *)340340- transfer_buffer;341341-342342- num_ports = le16_to_cpu(connection_info->num_ports);343343- for (i = 0; i < num_ports; ++i) {344344- switch (345345- connection_info->connections[i].port_function_id) {346346- case VISOR_FUNCTION_GENERIC:347347- string = "Generic";348348- break;349349- case VISOR_FUNCTION_DEBUGGER:350350- string = "Debugger";351351- break;352352- case VISOR_FUNCTION_HOTSYNC:353353- string = "HotSync";354354- break;355355- case VISOR_FUNCTION_CONSOLE:356356- string = "Console";357357- break;358358- case VISOR_FUNCTION_REMOTE_FILE_SYS:359359- string = "Remote File System";360360- break;361361- default:362362- string = "unknown";363363- break;364364- }365365- dev_info(dev, "%s: port %d, is for %s use\n",366366- serial->type->description,367367- connection_info->connections[i].port, string);368368- }338338+ if (retval != sizeof(*connection_info)) {339339+ dev_err(dev, "Invalid connection information received from device\n");340340+ retval = -ENODEV;341341+ goto exit;369342 }370370- /*371371- * Handle devices that report invalid stuff here.372372- */343343+344344+ connection_info = (struct visor_connection_info *)transfer_buffer;345345+346346+ num_ports = le16_to_cpu(connection_info->num_ports);347347+348348+ /* Handle devices that report invalid stuff here. */373349 if (num_ports == 0 || num_ports > 2) {374350 dev_warn(dev, "%s: No valid connect info available\n",375351 serial->type->description);376352 num_ports = 2;377353 }378354355355+ for (i = 0; i < num_ports; ++i) {356356+ switch (connection_info->connections[i].port_function_id) {357357+ case VISOR_FUNCTION_GENERIC:358358+ string = "Generic";359359+ break;360360+ case VISOR_FUNCTION_DEBUGGER:361361+ string = "Debugger";362362+ break;363363+ case VISOR_FUNCTION_HOTSYNC:364364+ string = "HotSync";365365+ break;366366+ case VISOR_FUNCTION_CONSOLE:367367+ string = "Console";368368+ break;369369+ case VISOR_FUNCTION_REMOTE_FILE_SYS:370370+ string = "Remote File System";371371+ break;372372+ default:373373+ string = "unknown";374374+ break;375375+ }376376+ dev_info(dev, "%s: port %d, is for %s use\n",377377+ serial->type->description,378378+ connection_info->connections[i].port, string);379379+ }379380 dev_info(dev, "%s: Number of ports: %d\n", serial->type->description,380381 num_ports);381382
+1
drivers/usb/typec/tcpm.c
···46524652 for (i = 0; i < ARRAY_SIZE(port->port_altmode); i++)46534653 typec_unregister_altmode(port->port_altmode[i]);46544654 typec_unregister_port(port->typec_port);46554655+ usb_role_switch_put(port->role_sw);46554656 tcpm_debugfs_exit(port);46564657 destroy_workqueue(port->wq);46574658}
+39-8
drivers/usb/typec/tps6598x.c
···7373 struct device *dev;7474 struct regmap *regmap;7575 struct mutex lock; /* device lock */7676+ u8 i2c_protocol:1;76777778 struct typec_port *port;7879 struct typec_partner *partner;···8180 struct typec_capability typec_cap;8281};83828383+static int8484+tps6598x_block_read(struct tps6598x *tps, u8 reg, void *val, size_t len)8585+{8686+ u8 data[len + 1];8787+ int ret;8888+8989+ if (!tps->i2c_protocol)9090+ return regmap_raw_read(tps->regmap, reg, val, len);9191+9292+ ret = regmap_raw_read(tps->regmap, reg, data, sizeof(data));9393+ if (ret)9494+ return ret;9595+9696+ if (data[0] < len)9797+ return -EIO;9898+9999+ memcpy(val, &data[1], len);100100+ return 0;101101+}102102+84103static inline int tps6598x_read16(struct tps6598x *tps, u8 reg, u16 *val)85104{8686- return regmap_raw_read(tps->regmap, reg, val, sizeof(u16));105105+ return tps6598x_block_read(tps, reg, val, sizeof(u16));87106}8810789108static inline int tps6598x_read32(struct tps6598x *tps, u8 reg, u32 *val)90109{9191- return regmap_raw_read(tps->regmap, reg, val, sizeof(u32));110110+ return tps6598x_block_read(tps, reg, val, sizeof(u32));92111}9311294113static inline int tps6598x_read64(struct tps6598x *tps, u8 reg, u64 *val)95114{9696- return regmap_raw_read(tps->regmap, reg, val, sizeof(u64));115115+ return tps6598x_block_read(tps, reg, val, sizeof(u64));97116}9811799118static inline int tps6598x_write16(struct tps6598x *tps, u8 reg, u16 val)···142121 struct tps6598x_rx_identity_reg id;143122 int ret;144123145145- ret = regmap_raw_read(tps->regmap, TPS_REG_RX_IDENTITY_SOP,146146- &id, sizeof(id));124124+ ret = tps6598x_block_read(tps, TPS_REG_RX_IDENTITY_SOP,125125+ &id, sizeof(id));147126 if (ret)148127 return ret;149128···245224 } while (val);246225247226 if (out_len) {248248- ret = regmap_raw_read(tps->regmap, TPS_REG_DATA1,249249- out_data, out_len);227227+ ret = tps6598x_block_read(tps, TPS_REG_DATA1,228228+ out_data, out_len);250229 if (ret)251230 return ret;252231 val = out_data[0];253232 } else {254254- ret = regmap_read(tps->regmap, TPS_REG_DATA1, &val);233233+ ret = tps6598x_block_read(tps, TPS_REG_DATA1, &val, sizeof(u8));255234 if (ret)256235 return ret;257236 }···405384 return ret;406385 if (!vid)407386 return -ENODEV;387387+388388+ /*389389+ * Checking can the adapter handle SMBus protocol. If it can not, the390390+ * driver needs to take care of block reads separately.391391+ *392392+ * FIXME: Testing with I2C_FUNC_I2C. regmap-i2c uses I2C protocol393393+ * unconditionally if the adapter has I2C_FUNC_I2C set.394394+ */395395+ if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C))396396+ tps->i2c_protocol = true;408397409398 ret = tps6598x_read32(tps, TPS_REG_STATUS, &status);410399 if (ret < 0)
+7
fs/btrfs/extent-tree.c
···31423142 struct rb_node *node;31433143 int ret = 0;3144314431453145+ spin_lock(&root->fs_info->trans_lock);31453146 cur_trans = root->fs_info->running_transaction;31473147+ if (cur_trans)31483148+ refcount_inc(&cur_trans->use_count);31493149+ spin_unlock(&root->fs_info->trans_lock);31463150 if (!cur_trans)31473151 return 0;31483152···31553151 head = btrfs_find_delayed_ref_head(delayed_refs, bytenr);31563152 if (!head) {31573153 spin_unlock(&delayed_refs->lock);31543154+ btrfs_put_transaction(cur_trans);31583155 return 0;31593156 }31603157···31723167 mutex_lock(&head->mutex);31733168 mutex_unlock(&head->mutex);31743169 btrfs_put_delayed_ref_head(head);31703170+ btrfs_put_transaction(cur_trans);31753171 return -EAGAIN;31763172 }31773173 spin_unlock(&delayed_refs->lock);···32053199 }32063200 spin_unlock(&head->lock);32073201 mutex_unlock(&head->mutex);32023202+ btrfs_put_transaction(cur_trans);32083203 return ret;32093204}32103205
···52365236 len = btrfs_file_extent_num_bytes(path->nodes[0], ei);52375237 }5238523852395239+ if (offset >= sctx->cur_inode_size) {52405240+ ret = 0;52415241+ goto out;52425242+ }52395243 if (offset + len > sctx->cur_inode_size)52405244 len = sctx->cur_inode_size - offset;52415245 if (len == 0) {
+1-1
fs/cifs/Kconfig
···197197198198config CIFS_SMB_DIRECT199199 bool "SMB Direct support (Experimental)"200200- depends on CIFS=m && INFINIBAND || CIFS=y && INFINIBAND=y200200+ depends on CIFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || CIFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y201201 help202202 Enables SMB Direct experimental support for SMB 3.0, 3.02 and 3.1.1.203203 SMB Direct allows transferring SMB packets over RDMA. If unsure,
+1-1
fs/fs-writeback.c
···19611961 }1962196219631963 if (!list_empty(&wb->work_list))19641964- mod_delayed_work(bdi_wq, &wb->dwork, 0);19641964+ wb_wakeup(wb);19651965 else if (wb_has_dirty_io(wb) && dirty_writeback_interval)19661966 wb_wakeup_delayed(wb);19671967
+8-1
fs/xfs/libxfs/xfs_attr.c
···511511 if (args->flags & ATTR_CREATE)512512 return retval;513513 retval = xfs_attr_shortform_remove(args);514514- ASSERT(retval == 0);514514+ if (retval)515515+ return retval;516516+ /*517517+ * Since we have removed the old attr, clear ATTR_REPLACE so518518+ * that the leaf format add routine won't trip over the attr519519+ * not being around.520520+ */521521+ args->flags &= ~ATTR_REPLACE;515522 }516523517524 if (args->namelen >= XFS_ATTR_SF_ENTSIZE_MAX ||
···466466 return __this_address;467467 if (di_size > XFS_DFORK_DSIZE(dip, mp))468468 return __this_address;469469+ if (dip->di_nextents)470470+ return __this_address;469471 /* fall through */470472 case XFS_DINODE_FMT_EXTENTS:471473 case XFS_DINODE_FMT_BTREE:···486484 if (XFS_DFORK_Q(dip)) {487485 switch (dip->di_aformat) {488486 case XFS_DINODE_FMT_LOCAL:487487+ if (dip->di_anextents)488488+ return __this_address;489489+ /* fall through */489490 case XFS_DINODE_FMT_EXTENTS:490491 case XFS_DINODE_FMT_BTREE:491492 break;492493 default:493494 return __this_address;494495 }496496+ } else {497497+ /*498498+ * If there is no fork offset, this may be a freshly-made inode499499+ * in a new disk cluster, in which case di_aformat is zeroed.500500+ * Otherwise, such an inode must be in EXTENTS format; this goes501501+ * for freed inodes as well.502502+ */503503+ switch (dip->di_aformat) {504504+ case 0:505505+ case XFS_DINODE_FMT_EXTENTS:506506+ break;507507+ default:508508+ return __this_address;509509+ }510510+ if (dip->di_anextents)511511+ return __this_address;495512 }496513497514 /* only version 3 or greater inodes are extensively verified here */
+19-5
fs/xfs/xfs_file.c
···778778 if (error)779779 goto out_unlock;780780 } else if (mode & FALLOC_FL_INSERT_RANGE) {781781- unsigned int blksize_mask = i_blocksize(inode) - 1;781781+ unsigned int blksize_mask = i_blocksize(inode) - 1;782782+ loff_t isize = i_size_read(inode);782783783783- new_size = i_size_read(inode) + len;784784 if (offset & blksize_mask || len & blksize_mask) {785785 error = -EINVAL;786786 goto out_unlock;787787 }788788789789- /* check the new inode size does not wrap through zero */790790- if (new_size > inode->i_sb->s_maxbytes) {789789+ /*790790+ * New inode size must not exceed ->s_maxbytes, accounting for791791+ * possible signed overflow.792792+ */793793+ if (inode->i_sb->s_maxbytes - isize < len) {791794 error = -EFBIG;792795 goto out_unlock;793796 }797797+ new_size = isize + len;794798795799 /* Offset should be less than i_size */796796- if (offset >= i_size_read(inode)) {800800+ if (offset >= isize) {797801 error = -EINVAL;798802 goto out_unlock;799803 }···880876 struct file *dst_file,881877 u64 dst_loff)882878{879879+ struct inode *srci = file_inode(src_file);880880+ u64 max_dedupe;883881 int error;884882883883+ /*884884+ * Since we have to read all these pages in to compare them, cut885885+ * it off at MAX_RW_COUNT/2 rounded down to the nearest block.886886+ * That means we won't do more than MAX_RW_COUNT IO per request.887887+ */888888+ max_dedupe = (MAX_RW_COUNT >> 1) & ~(i_blocksize(srci) - 1);889889+ if (len > max_dedupe)890890+ len = max_dedupe;885891 error = xfs_reflink_remap_range(src_file, loff, dst_file, dst_loff,886892 len, true);887893 if (error)
···5252#define USB_GADGET_DELAYED_STATUS 0x7fff /* Impossibly large value */53535454/* big enough to hold our biggest descriptor */5555-#define USB_COMP_EP0_BUFSIZ 10245555+#define USB_COMP_EP0_BUFSIZ 409656565757/* OS feature descriptor length <= 4kB */5858#define USB_COMP_EP0_OS_DESC_BUFSIZ 4096
+17
include/linux/wait_bit.h
···305305 __ret; \306306})307307308308+/**309309+ * clear_and_wake_up_bit - clear a bit and wake up anyone waiting on that bit310310+ *311311+ * @bit: the bit of the word being waited on312312+ * @word: the word being waited on, a kernel virtual address313313+ *314314+ * You can use this helper if bitflags are manipulated atomically rather than315315+ * non-atomically under a lock.316316+ */317317+static inline void clear_and_wake_up_bit(int bit, void *word)318318+{319319+ clear_bit_unlock(bit, word);320320+ /* See wake_up_bit() for which memory barrier you need to use. */321321+ smp_mb__after_atomic();322322+ wake_up_bit(word, bit);323323+}324324+308325#endif /* _LINUX_WAIT_BIT_H */
+1-1
include/media/i2c/tvp7002.h
···55 * Author: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com>66 *77 * This code is partially based upon the TVP5150 driver88- * written by Mauro Carvalho Chehab (mchehab@infradead.org),88+ * written by Mauro Carvalho Chehab <mchehab@kernel.org>,99 * the TVP514x driver written by Vaibhav Hiremath <hvaibhav@ti.com>1010 * and the TVP7002 driver in the TI LSP 2.10.00.141111 *
+2-2
include/media/videobuf-core.h
···11/*22 * generic helper functions for handling video4linux capture buffers33 *44- * (c) 2007 Mauro Carvalho Chehab, <mchehab@infradead.org>44+ * (c) 2007 Mauro Carvalho Chehab, <mchehab@kernel.org>55 *66 * Highly based on video-buf written originally by:77 * (c) 2001,02 Gerd Knorr <kraxel@bytesex.org>88- * (c) 2006 Mauro Carvalho Chehab, <mchehab@infradead.org>88+ * (c) 2006 Mauro Carvalho Chehab, <mchehab@kernel.org>99 * (c) 2006 Ted Walther and John Sokol1010 *1111 * This program is free software; you can redistribute it and/or modify
+2-2
include/media/videobuf-dma-sg.h
···66 * into PAGE_SIZE chunks). They also assume the driver does not need77 * to touch the video data.88 *99- * (c) 2007 Mauro Carvalho Chehab, <mchehab@infradead.org>99+ * (c) 2007 Mauro Carvalho Chehab, <mchehab@kernel.org>1010 *1111 * Highly based on video-buf written originally by:1212 * (c) 2001,02 Gerd Knorr <kraxel@bytesex.org>1313- * (c) 2006 Mauro Carvalho Chehab, <mchehab@infradead.org>1313+ * (c) 2006 Mauro Carvalho Chehab, <mchehab@kernel.org>1414 * (c) 2006 Ted Walther and John Sokol1515 *1616 * This program is free software; you can redistribute it and/or modify
+1-1
include/media/videobuf-vmalloc.h
···66 * into PAGE_SIZE chunks). They also assume the driver does not need77 * to touch the video data.88 *99- * (c) 2007 Mauro Carvalho Chehab, <mchehab@infradead.org>99+ * (c) 2007 Mauro Carvalho Chehab, <mchehab@kernel.org>1010 *1111 * This program is free software; you can redistribute it and/or modify1212 * it under the terms of the GNU General Public License as published by
+1
include/net/tls.h
···148148 struct scatterlist *partially_sent_record;149149 u16 partially_sent_offset;150150 unsigned long flags;151151+ bool in_tcp_sendpages;151152152153 u16 pending_open_record_frags;153154 int (*push_pending_record)(struct sock *sk, int flags);
+11-3
include/trace/events/initcall.h
···3131 TP_ARGS(func),32323333 TP_STRUCT__entry(3434- __field(initcall_t, func)3434+ /*3535+ * Use field_struct to avoid is_signed_type()3636+ * comparison of a function pointer3737+ */3838+ __field_struct(initcall_t, func)3539 ),36403741 TP_fast_assign(···5248 TP_ARGS(func, ret),53495450 TP_STRUCT__entry(5555- __field(initcall_t, func)5656- __field(int, ret)5151+ /*5252+ * Use field_struct to avoid is_signed_type()5353+ * comparison of a function pointer5454+ */5555+ __field_struct(initcall_t, func)5656+ __field(int, ret)5757 ),58585959 TP_fast_assign(
+1-1
include/uapi/linux/if_infiniband.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */22/*33 * This software is available to you under a choice of one of two44 * licenses. You may choose to be licensed under the terms of the GNU
+1-1
include/uapi/linux/rds.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2008 Oracle. All rights reserved.44 *
+1-1
include/uapi/linux/tls.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2016-2017, Mellanox Technologies. All rights reserved.44 *
+1-1
include/uapi/rdma/cxgb3-abi.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2006 Chelsio, Inc. All rights reserved.44 *
+1-1
include/uapi/rdma/cxgb4-abi.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2009-2010 Chelsio, Inc. All rights reserved.44 *
+1-1
include/uapi/rdma/hns-abi.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2016 Hisilicon Limited.44 *
+1-1
include/uapi/rdma/ib_user_cm.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2005 Topspin Communications. All rights reserved.44 * Copyright (c) 2005 Intel Corporation. All rights reserved.
+1-1
include/uapi/rdma/ib_user_ioctl_verbs.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2017-2018, Mellanox Technologies inc. All rights reserved.44 *
+1-1
include/uapi/rdma/ib_user_mad.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2004 Topspin Communications. All rights reserved.44 * Copyright (c) 2005 Voltaire, Inc. All rights reserved.
+1-1
include/uapi/rdma/ib_user_sa.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2005 Intel Corporation. All rights reserved.44 *
+1-1
include/uapi/rdma/ib_user_verbs.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2005 Topspin Communications. All rights reserved.44 * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.
+1-1
include/uapi/rdma/mlx4-abi.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.44 * Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
+1-1
include/uapi/rdma/mlx5-abi.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2013-2015, Mellanox Technologies. All rights reserved.44 *
+1-1
include/uapi/rdma/mthca-abi.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2005 Topspin Communications. All rights reserved.44 * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.
+1-1
include/uapi/rdma/nes-abi.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.44 * Copyright (c) 2005 Topspin Communications. All rights reserved.
+1-1
include/uapi/rdma/qedr-abi.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/* QLogic qedr NIC Driver33 * Copyright (c) 2015-2016 QLogic Corporation44 *
+1-1
include/uapi/rdma/rdma_user_cm.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2005-2006 Intel Corporation. All rights reserved.44 *
+1-1
include/uapi/rdma/rdma_user_ioctl.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2016 Mellanox Technologies, LTD. All rights reserved.44 *
+1-1
include/uapi/rdma/rdma_user_rxe.h
···11-/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */11+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR Linux-OpenIB) */22/*33 * Copyright (c) 2016 Mellanox Technologies Ltd. All rights reserved.44 *
+2-1
kernel/bpf/arraymap.c
···476476}477477478478/* decrement refcnt of all bpf_progs that are stored in this map */479479-void bpf_fd_array_map_clear(struct bpf_map *map)479479+static void bpf_fd_array_map_clear(struct bpf_map *map)480480{481481 struct bpf_array *array = container_of(map, struct bpf_array, map);482482 int i;···495495 .map_fd_get_ptr = prog_fd_array_get_ptr,496496 .map_fd_put_ptr = prog_fd_array_put_ptr,497497 .map_fd_sys_lookup_elem = prog_fd_array_sys_lookup_elem,498498+ .map_release_uref = bpf_fd_array_map_clear,498499};499500500501static struct bpf_event_entry *bpf_event_entry_gen(struct file *perf_file,
+73-26
kernel/bpf/sockmap.c
···4343#include <net/tcp.h>4444#include <linux/ptr_ring.h>4545#include <net/inet_common.h>4646+#include <linux/sched/signal.h>46474748#define SOCK_CREATE_FLAG_MASK \4849 (BPF_F_NUMA_NODE | BPF_F_RDONLY | BPF_F_WRONLY)···326325 if (ret > 0) {327326 if (apply)328327 apply_bytes -= ret;328328+329329+ sg->offset += ret;330330+ sg->length -= ret;329331 size -= ret;330332 offset += ret;331333 if (uncharge)···336332 goto retry;337333 }338334339339- sg->length = size;340340- sg->offset = offset;341335 return ret;342336 }343337···393391 } while (i != md->sg_end);394392}395393396396-static void free_bytes_sg(struct sock *sk, int bytes, struct sk_msg_buff *md)394394+static void free_bytes_sg(struct sock *sk, int bytes,395395+ struct sk_msg_buff *md, bool charge)397396{398397 struct scatterlist *sg = md->sg_data;399398 int i = md->sg_start, free;···404401 if (bytes < free) {405402 sg[i].length -= bytes;406403 sg[i].offset += bytes;407407- sk_mem_uncharge(sk, bytes);404404+ if (charge)405405+ sk_mem_uncharge(sk, bytes);408406 break;409407 }410408411411- sk_mem_uncharge(sk, sg[i].length);409409+ if (charge)410410+ sk_mem_uncharge(sk, sg[i].length);412411 put_page(sg_page(&sg[i]));413412 bytes -= sg[i].length;414413 sg[i].length = 0;···421416 if (i == MAX_SKB_FRAGS)422417 i = 0;423418 }419419+ md->sg_start = i;424420}425421426422static int free_sg(struct sock *sk, int start, struct sk_msg_buff *md)···529523 i = md->sg_start;530524531525 do {532532- r->sg_data[i] = md->sg_data[i];533533-534526 size = (apply && apply_bytes < md->sg_data[i].length) ?535527 apply_bytes : md->sg_data[i].length;536528···539535 }540536541537 sk_mem_charge(sk, size);538538+ r->sg_data[i] = md->sg_data[i];542539 r->sg_data[i].length = size;543540 md->sg_data[i].length -= size;544541 md->sg_data[i].offset += size;···580575 struct sk_msg_buff *md,581576 int flags)582577{578578+ bool ingress = !!(md->flags & BPF_F_INGRESS);583579 struct smap_psock *psock;584580 struct scatterlist *sg;585585- int i, err, free = 0;586586- bool ingress = !!(md->flags & BPF_F_INGRESS);581581+ int err = 0;587582588583 sg = md->sg_data;589584···611606out_rcu:612607 rcu_read_unlock();613608out:614614- i = md->sg_start;615615- while (sg[i].length) {616616- free += sg[i].length;617617- put_page(sg_page(&sg[i]));618618- sg[i].length = 0;619619- i++;620620- if (i == MAX_SKB_FRAGS)621621- i = 0;622622- }623623- return free;609609+ free_bytes_sg(NULL, send, md, false);610610+ return err;624611}625612626613static inline void bpf_md_init(struct smap_psock *psock)···697700 err = bpf_tcp_sendmsg_do_redirect(redir, send, m, flags);698701 lock_sock(sk);699702703703+ if (unlikely(err < 0)) {704704+ free_start_sg(sk, m);705705+ psock->sg_size = 0;706706+ if (!cork)707707+ *copied -= send;708708+ } else {709709+ psock->sg_size -= send;710710+ }711711+700712 if (cork) {701713 free_start_sg(sk, m);714714+ psock->sg_size = 0;702715 kfree(m);703716 m = NULL;717717+ err = 0;704718 }705705- if (unlikely(err))706706- *copied -= err;707707- else708708- psock->sg_size -= send;709719 break;710720 case __SK_DROP:711721 default:712712- free_bytes_sg(sk, send, m);722722+ free_bytes_sg(sk, send, m, true);713723 apply_bytes_dec(psock, send);714724 *copied -= send;715725 psock->sg_size -= send;···734730735731out_err:736732 return err;733733+}734734+735735+static int bpf_wait_data(struct sock *sk,736736+ struct smap_psock *psk, int flags,737737+ long timeo, int *err)738738+{739739+ int rc;740740+741741+ DEFINE_WAIT_FUNC(wait, woken_wake_function);742742+743743+ add_wait_queue(sk_sleep(sk), &wait);744744+ sk_set_bit(SOCKWQ_ASYNC_WAITDATA, sk);745745+ rc = sk_wait_event(sk, &timeo,746746+ !list_empty(&psk->ingress) ||747747+ !skb_queue_empty(&sk->sk_receive_queue),748748+ &wait);749749+ sk_clear_bit(SOCKWQ_ASYNC_WAITDATA, sk);750750+ remove_wait_queue(sk_sleep(sk), &wait);751751+752752+ return rc;737753}738754739755static int bpf_tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,···779755 return tcp_recvmsg(sk, msg, len, nonblock, flags, addr_len);780756781757 lock_sock(sk);758758+bytes_ready:782759 while (copied != len) {783760 struct scatterlist *sg;784761 struct sk_msg_buff *md;···832807 consume_skb(md->skb);833808 kfree(md);834809 }810810+ }811811+812812+ if (!copied) {813813+ long timeo;814814+ int data;815815+ int err = 0;816816+817817+ timeo = sock_rcvtimeo(sk, nonblock);818818+ data = bpf_wait_data(sk, psock, flags, timeo, &err);819819+820820+ if (data) {821821+ if (!skb_queue_empty(&sk->sk_receive_queue)) {822822+ release_sock(sk);823823+ smap_release_sock(psock, sk);824824+ copied = tcp_recvmsg(sk, msg, len, nonblock, flags, addr_len);825825+ return copied;826826+ }827827+ goto bytes_ready;828828+ }829829+830830+ if (err)831831+ copied = err;835832 }836833837834 release_sock(sk);···18781831 return err;18791832}1880183318811881-static void sock_map_release(struct bpf_map *map, struct file *map_file)18341834+static void sock_map_release(struct bpf_map *map)18821835{18831836 struct bpf_stab *stab = container_of(map, struct bpf_stab, map);18841837 struct bpf_prog *orig;···19021855 .map_get_next_key = sock_map_get_next_key,19031856 .map_update_elem = sock_map_update_elem,19041857 .map_delete_elem = sock_map_delete_elem,19051905- .map_release = sock_map_release,18581858+ .map_release_uref = sock_map_release,19061859};1907186019081861BPF_CALL_4(bpf_sock_map_update, struct bpf_sock_ops_kern *, bpf_sock,
+2-2
kernel/bpf/syscall.c
···257257static void bpf_map_put_uref(struct bpf_map *map)258258{259259 if (atomic_dec_and_test(&map->usercnt)) {260260- if (map->map_type == BPF_MAP_TYPE_PROG_ARRAY)261261- bpf_fd_array_map_clear(map);260260+ if (map->ops->map_release_uref)261261+ map->ops->map_release_uref(map);262262 }263263}264264
+3-4
kernel/events/uprobes.c
···491491 if (!uprobe)492492 return NULL;493493494494- uprobe->inode = igrab(inode);494494+ uprobe->inode = inode;495495 uprobe->offset = offset;496496 init_rwsem(&uprobe->register_rwsem);497497 init_rwsem(&uprobe->consumer_rwsem);···502502 if (cur_uprobe) {503503 kfree(uprobe);504504 uprobe = cur_uprobe;505505- iput(inode);506505 }507506508507 return uprobe;···700701 rb_erase(&uprobe->rb_node, &uprobes_tree);701702 spin_unlock(&uprobes_treelock);702703 RB_CLEAR_NODE(&uprobe->rb_node); /* for uprobe_is_active() */703703- iput(uprobe->inode);704704 put_uprobe(uprobe);705705}706706···871873 * tuple). Creation refcount stops uprobe_unregister from freeing the872874 * @uprobe even before the register operation is complete. Creation873875 * refcount is released when the last @uc for the @uprobe874874- * unregisters.876876+ * unregisters. Caller of uprobe_register() is required to keep @inode877877+ * (and the containing mount) referenced.875878 *876879 * Return errno if it cannot successully install probes877880 * else return 0 (success)
+44-19
kernel/time/clocksource.c
···119119static int watchdog_running;120120static atomic_t watchdog_reset_pending;121121122122+static void inline clocksource_watchdog_lock(unsigned long *flags)123123+{124124+ spin_lock_irqsave(&watchdog_lock, *flags);125125+}126126+127127+static void inline clocksource_watchdog_unlock(unsigned long *flags)128128+{129129+ spin_unlock_irqrestore(&watchdog_lock, *flags);130130+}131131+122132static int clocksource_watchdog_kthread(void *data);123133static void __clocksource_change_rating(struct clocksource *cs, int rating);124134···152142 cs->flags &= ~(CLOCK_SOURCE_VALID_FOR_HRES | CLOCK_SOURCE_WATCHDOG);153143 cs->flags |= CLOCK_SOURCE_UNSTABLE;154144145145+ /*146146+ * If the clocksource is registered clocksource_watchdog_kthread() will147147+ * re-rate and re-select.148148+ */149149+ if (list_empty(&cs->list)) {150150+ cs->rating = 0;151151+ return;152152+ }153153+155154 if (cs->mark_unstable)156155 cs->mark_unstable(cs);157156157157+ /* kick clocksource_watchdog_kthread() */158158 if (finished_booting)159159 schedule_work(&watchdog_work);160160}···173153 * clocksource_mark_unstable - mark clocksource unstable via watchdog174154 * @cs: clocksource to be marked unstable175155 *176176- * This function is called instead of clocksource_change_rating from177177- * cpu hotplug code to avoid a deadlock between the clocksource mutex178178- * and the cpu hotplug mutex. It defers the update of the clocksource179179- * to the watchdog thread.156156+ * This function is called by the x86 TSC code to mark clocksources as unstable;157157+ * it defers demotion and re-selection to a kthread.180158 */181159void clocksource_mark_unstable(struct clocksource *cs)182160{···182164183165 spin_lock_irqsave(&watchdog_lock, flags);184166 if (!(cs->flags & CLOCK_SOURCE_UNSTABLE)) {185185- if (list_empty(&cs->wd_list))167167+ if (!list_empty(&cs->list) && list_empty(&cs->wd_list))186168 list_add(&cs->wd_list, &watchdog_list);187169 __clocksource_unstable(cs);188170 }···337319338320static void clocksource_enqueue_watchdog(struct clocksource *cs)339321{340340- unsigned long flags;322322+ INIT_LIST_HEAD(&cs->wd_list);341323342342- spin_lock_irqsave(&watchdog_lock, flags);343324 if (cs->flags & CLOCK_SOURCE_MUST_VERIFY) {344325 /* cs is a clocksource to be watched. */345326 list_add(&cs->wd_list, &watchdog_list);···348331 if (cs->flags & CLOCK_SOURCE_IS_CONTINUOUS)349332 cs->flags |= CLOCK_SOURCE_VALID_FOR_HRES;350333 }351351- spin_unlock_irqrestore(&watchdog_lock, flags);352334}353335354336static void clocksource_select_watchdog(bool fallback)···389373390374static void clocksource_dequeue_watchdog(struct clocksource *cs)391375{392392- unsigned long flags;393393-394394- spin_lock_irqsave(&watchdog_lock, flags);395376 if (cs != watchdog) {396377 if (cs->flags & CLOCK_SOURCE_MUST_VERIFY) {397378 /* cs is a watched clocksource. */···397384 clocksource_stop_watchdog();398385 }399386 }400400- spin_unlock_irqrestore(&watchdog_lock, flags);401387}402388403389static int __clocksource_watchdog_kthread(void)404390{405391 struct clocksource *cs, *tmp;406392 unsigned long flags;407407- LIST_HEAD(unstable);408393 int select = 0;409394410395 spin_lock_irqsave(&watchdog_lock, flags);411396 list_for_each_entry_safe(cs, tmp, &watchdog_list, wd_list) {412397 if (cs->flags & CLOCK_SOURCE_UNSTABLE) {413398 list_del_init(&cs->wd_list);414414- list_add(&cs->wd_list, &unstable);399399+ __clocksource_change_rating(cs, 0);415400 select = 1;416401 }417402 if (cs->flags & CLOCK_SOURCE_RESELECT) {···421410 clocksource_stop_watchdog();422411 spin_unlock_irqrestore(&watchdog_lock, flags);423412424424- /* Needs to be done outside of watchdog lock */425425- list_for_each_entry_safe(cs, tmp, &unstable, wd_list) {426426- list_del_init(&cs->wd_list);427427- __clocksource_change_rating(cs, 0);428428- }429413 return select;430414}431415···452446static inline int __clocksource_watchdog_kthread(void) { return 0; }453447static bool clocksource_is_watchdog(struct clocksource *cs) { return false; }454448void clocksource_mark_unstable(struct clocksource *cs) { }449449+450450+static void inline clocksource_watchdog_lock(unsigned long *flags) { }451451+static void inline clocksource_watchdog_unlock(unsigned long *flags) { }455452456453#endif /* CONFIG_CLOCKSOURCE_WATCHDOG */457454···788779 */789780int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq)790781{782782+ unsigned long flags;791783792784 /* Initialize mult/shift and max_idle_ns */793785 __clocksource_update_freq_scale(cs, scale, freq);794786795787 /* Add clocksource to the clocksource list */796788 mutex_lock(&clocksource_mutex);789789+790790+ clocksource_watchdog_lock(&flags);797791 clocksource_enqueue(cs);798792 clocksource_enqueue_watchdog(cs);793793+ clocksource_watchdog_unlock(&flags);794794+799795 clocksource_select();800796 clocksource_select_watchdog(false);801797 mutex_unlock(&clocksource_mutex);···822808 */823809void clocksource_change_rating(struct clocksource *cs, int rating)824810{811811+ unsigned long flags;812812+825813 mutex_lock(&clocksource_mutex);814814+ clocksource_watchdog_lock(&flags);826815 __clocksource_change_rating(cs, rating);816816+ clocksource_watchdog_unlock(&flags);817817+827818 clocksource_select();828819 clocksource_select_watchdog(false);829820 mutex_unlock(&clocksource_mutex);···840821 */841822static int clocksource_unbind(struct clocksource *cs)842823{824824+ unsigned long flags;825825+843826 if (clocksource_is_watchdog(cs)) {844827 /* Select and try to install a replacement watchdog. */845828 clocksource_select_watchdog(true);···855834 if (curr_clocksource == cs)856835 return -EBUSY;857836 }837837+838838+ clocksource_watchdog_lock(&flags);858839 clocksource_dequeue_watchdog(cs);859840 list_del_init(&cs->list);841841+ clocksource_watchdog_unlock(&flags);842842+860843 return 0;861844}862845
···5555 struct list_head list;5656 struct trace_uprobe_filter filter;5757 struct uprobe_consumer consumer;5858+ struct path path;5859 struct inode *inode;5960 char *filename;6061 unsigned long offset;···290289 for (i = 0; i < tu->tp.nr_args; i++)291290 traceprobe_free_probe_arg(&tu->tp.args[i]);292291293293- iput(tu->inode);292292+ path_put(&tu->path);294293 kfree(tu->tp.call.class->system);295294 kfree(tu->tp.call.name);296295 kfree(tu->filename);···364363static int create_trace_uprobe(int argc, char **argv)365364{366365 struct trace_uprobe *tu;367367- struct inode *inode;368366 char *arg, *event, *group, *filename;369367 char buf[MAX_EVENT_NAME_LEN];370368 struct path path;···371371 bool is_delete, is_return;372372 int i, ret;373373374374- inode = NULL;375374 ret = 0;376375 is_delete = false;377376 is_return = false;···436437 }437438 /* Find the last occurrence, in case the path contains ':' too. */438439 arg = strrchr(argv[1], ':');439439- if (!arg) {440440- ret = -EINVAL;441441- goto fail_address_parse;442442- }440440+ if (!arg)441441+ return -EINVAL;443442444443 *arg++ = '\0';445444 filename = argv[1];446445 ret = kern_path(filename, LOOKUP_FOLLOW, &path);447446 if (ret)448448- goto fail_address_parse;447447+ return ret;449448450450- inode = igrab(d_real_inode(path.dentry));451451- path_put(&path);452452-453453- if (!inode || !S_ISREG(inode->i_mode)) {449449+ if (!d_is_reg(path.dentry)) {454450 ret = -EINVAL;455451 goto fail_address_parse;456452 }···484490 goto fail_address_parse;485491 }486492 tu->offset = offset;487487- tu->inode = inode;493493+ tu->path = path;488494 tu->filename = kstrdup(filename, GFP_KERNEL);489495490496 if (!tu->filename) {···552558 return ret;553559554560fail_address_parse:555555- iput(inode);561561+ path_put(&path);556562557563 pr_info("Failed to parse address or file.\n");558564···916922 goto err_flags;917923918924 tu->consumer.filter = filter;925925+ tu->inode = d_real_inode(tu->path.dentry);919926 ret = uprobe_register(tu->inode, tu->offset, &tu->consumer);920927 if (ret)921928 goto err_buffer;···962967 WARN_ON(!uprobe_filter_is_empty(&tu->filter));963968964969 uprobe_unregister(tu->inode, tu->offset, &tu->consumer);970970+ tu->inode = NULL;965971 tu->tp.flags &= file ? ~TP_FLAG_TRACE : ~TP_FLAG_PROFILE;966972967973 uprobe_buffer_disable();···13331337create_local_trace_uprobe(char *name, unsigned long offs, bool is_return)13341338{13351339 struct trace_uprobe *tu;13361336- struct inode *inode;13371340 struct path path;13381341 int ret;13391342···13401345 if (ret)13411346 return ERR_PTR(ret);1342134713431343- inode = igrab(d_inode(path.dentry));13441344- path_put(&path);13451345-13461346- if (!inode || !S_ISREG(inode->i_mode)) {13471347- iput(inode);13481348+ if (!d_is_reg(path.dentry)) {13491349+ path_put(&path);13481350 return ERR_PTR(-EINVAL);13491351 }13501352···13561364 if (IS_ERR(tu)) {13571365 pr_info("Failed to allocate trace_uprobe.(%d)\n",13581366 (int)PTR_ERR(tu));13671367+ path_put(&path);13591368 return ERR_CAST(tu);13601369 }1361137013621371 tu->offset = offs;13631363- tu->inode = inode;13721372+ tu->path = path;13641373 tu->filename = kstrdup(name, GFP_KERNEL);13651374 init_trace_event_call(tu, &tu->tp.call);13661375
+2-2
kernel/tracepoint.c
···207207 lockdep_is_held(&tracepoints_mutex));208208 old = func_add(&tp_funcs, func, prio);209209 if (IS_ERR(old)) {210210- WARN_ON_ONCE(1);210210+ WARN_ON_ONCE(PTR_ERR(old) != -ENOMEM);211211 return PTR_ERR(old);212212 }213213···239239 lockdep_is_held(&tracepoints_mutex));240240 old = func_remove(&tp_funcs, func);241241 if (IS_ERR(old)) {242242- WARN_ON_ONCE(1);242242+ WARN_ON_ONCE(PTR_ERR(old) != -ENOMEM);243243 return PTR_ERR(old);244244 }245245
+9-14
lib/errseq.c
···111111 * errseq_sample() - Grab current errseq_t value.112112 * @eseq: Pointer to errseq_t to be sampled.113113 *114114- * This function allows callers to sample an errseq_t value, marking it as115115- * "seen" if required.114114+ * This function allows callers to initialise their errseq_t variable.115115+ * If the error has been "seen", new callers will not see an old error.116116+ * If there is an unseen error in @eseq, the caller of this function will117117+ * see it the next time it checks for an error.116118 *119119+ * Context: Any context.117120 * Return: The current errseq value.118121 */119122errseq_t errseq_sample(errseq_t *eseq)120123{121124 errseq_t old = READ_ONCE(*eseq);122122- errseq_t new = old;123125124124- /*125125- * For the common case of no errors ever having been set, we can skip126126- * marking the SEEN bit. Once an error has been set, the value will127127- * never go back to zero.128128- */129129- if (old != 0) {130130- new |= ERRSEQ_SEEN;131131- if (old != new)132132- cmpxchg(eseq, old, new);133133- }134134- return new;126126+ /* If nobody has seen this error yet, then we can be the first. */127127+ if (!(old & ERRSEQ_SEEN))128128+ old = 0;129129+ return old;135130}136131EXPORT_SYMBOL(errseq_sample);137132
···115115 bdi, &bdi_debug_stats_fops);116116 if (!bdi->debug_stats) {117117 debugfs_remove(bdi->debug_dir);118118+ bdi->debug_dir = NULL;118119 return -ENOMEM;119120 }120121···384383 * the barrier provided by test_and_clear_bit() above.385384 */386385 smp_wmb();387387- clear_bit(WB_shutting_down, &wb->state);386386+ clear_and_wake_up_bit(WB_shutting_down, &wb->state);388387}389388390389static void wb_exit(struct bdi_writeback *wb)
+2-2
net/bridge/br_if.c
···518518 return -ELOOP;519519 }520520521521- /* Device is already being bridged */522522- if (br_port_exists(dev))521521+ /* Device has master upper dev */522522+ if (netdev_master_upper_dev_get(dev))523523 return -EBUSY;524524525525 /* No bridging devices that dislike that (e.g. wireless) */
···10321032 info_size = sizeof(info);10331033 if (copy_from_user(&info, useraddr, info_size))10341034 return -EFAULT;10351035+ /* Since malicious users may modify the original data,10361036+ * we need to check whether FLOW_RSS is still requested.10371037+ */10381038+ if (!(info.flow_type & FLOW_RSS))10391039+ return -EINVAL;10351040 }1036104110371042 if (info.cmd == ETHTOOL_GRXCLSRLALL) {
···806806 }807807 }808808 }809809- bbr->idle_restart = 0;809809+ /* Restart after idle ends only once we process a new S/ACK for data */810810+ if (rs->delivered > 0)811811+ bbr->idle_restart = 0;810812}811813812814static void bbr_update_model(struct sock *sk, const struct rate_sample *rs)
···558558 struct rds_cmsg_rx_trace t;559559 int i, j;560560561561+ memset(&t, 0, sizeof(t));561562 inc->i_rx_lat_trace[RDS_MSG_RX_CMSG] = local_clock();562563 t.rx_traces = rs->rs_rx_traces;563564 for (i = 0; i < rs->rs_rx_traces; i++) {
···217217 skb_pull(chunk->skb, sizeof(*ch));218218 chunk->subh.v = NULL; /* Subheader is no longer valid. */219219220220- if (chunk->chunk_end + sizeof(*ch) < skb_tail_pointer(chunk->skb)) {220220+ if (chunk->chunk_end + sizeof(*ch) <= skb_tail_pointer(chunk->skb)) {221221 /* This is not a singleton */222222 chunk->singleton = 0;223223 } else if (chunk->chunk_end > skb_tail_pointer(chunk->skb)) {
···17941794 GFP_ATOMIC))17951795 goto nomem;1796179617971797+ if (sctp_auth_asoc_init_active_key(new_asoc, GFP_ATOMIC))17981798+ goto nomem;17991799+17971800 /* Make sure no new addresses are being added during the17981801 * restart. Though this is a pretty complicated attack17991802 * since you'd have to get inside the cookie.···19071904 peer_init = &chunk->subh.cookie_hdr->c.peer_init[0];19081905 if (!sctp_process_init(new_asoc, chunk, sctp_source(chunk), peer_init,19091906 GFP_ATOMIC))19071907+ goto nomem;19081908+19091909+ if (sctp_auth_asoc_init_active_key(new_asoc, GFP_ATOMIC))19101910 goto nomem;1911191119121912 /* Update the content of current association. */···20562050 }20572051 }2058205220592059- repl = sctp_make_cookie_ack(new_asoc, chunk);20532053+ repl = sctp_make_cookie_ack(asoc, chunk);20602054 if (!repl)20612055 goto nomem;20622056
···114114 size = sg->length - offset;115115 offset += sg->offset;116116117117+ ctx->in_tcp_sendpages = true;117118 while (1) {118119 if (sg_is_last(sg))119120 sendpage_flags = flags;···149148 }150149151150 clear_bit(TLS_PENDING_CLOSED_RECORD, &ctx->flags);151151+ ctx->in_tcp_sendpages = false;152152+ ctx->sk_write_space(sk);152153153154 return 0;154155}···219216static void tls_write_space(struct sock *sk)220217{221218 struct tls_context *ctx = tls_get_ctx(sk);219219+220220+ /* We are already sending pages, ignore notification */221221+ if (ctx->in_tcp_sendpages)222222+ return;222223223224 if (!sk->sk_write_pending && tls_is_pending_closed_record(ctx)) {224225 gfp_t sk_allocation = sk->sk_allocation;
+5-2
samples/sockmap/Makefile
···6565# asm/sysreg.h - inline assembly used by it is incompatible with llvm.6666# But, there is no easy way to fix it, so just exclude it since it is6767# useless for BPF samples.6868+#6969+# -target bpf option required with SK_MSG programs, this is to ensure7070+# reading 'void *' data types for data and data_end are __u64 reads.6871$(obj)/%.o: $(src)/%.c6972 $(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) -I$(obj) \7073 -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \7174 -Wno-compare-distinct-pointer-types \7275 -Wno-gnu-variable-sized-type-not-at-end \7376 -Wno-address-of-packed-member -Wno-tautological-compare \7474- -Wno-unknown-warning-option \7575- -O2 -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@7777+ -Wno-unknown-warning-option -O2 -target bpf \7878+ -emit-llvm -c $< -o -| $(LLC) -march=bpf -filetype=obj -o $@
+1-1
scripts/Makefile.gcc-plugins
···1414 endif15151616 ifdef CONFIG_GCC_PLUGIN_SANCOV1717- ifeq ($(CFLAGS_KCOV),)1717+ ifeq ($(strip $(CFLAGS_KCOV)),)1818 # It is needed because of the gcc-plugin.sh and gcc version checks.1919 gcc-plugin-$(CONFIG_GCC_PLUGIN_SANCOV) += sancov_plugin.so2020
···11#!/usr/bin/env perl2233-# Copyright (c) Mauro Carvalho Chehab <mchehab@infradead.org>33+# Copyright (c) Mauro Carvalho Chehab <mchehab@kernel.org>44# Released under GPLv255#66# In order to use, you need to:
+2-2
scripts/genksyms/Makefile
···1414# so that 'bison: not found' will be displayed if it is missing.1515ifeq ($(findstring 1,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)16161717-quiet_cmd_bison_no_warn = $(quet_cmd_bison)1717+quiet_cmd_bison_no_warn = $(quiet_cmd_bison)1818 cmd_bison_no_warn = $(YACC) --version >/dev/null; \1919 $(cmd_bison) 2>/dev/null20202121$(obj)/parse.tab.c: $(src)/parse.y FORCE2222 $(call if_changed,bison_no_warn)23232424-quiet_cmd_bison_h_no_warn = $(quet_cmd_bison_h)2424+quiet_cmd_bison_h_no_warn = $(quiet_cmd_bison_h)2525 cmd_bison_h_no_warn = $(YACC) --version >/dev/null; \2626 $(cmd_bison_h) 2>/dev/null2727
+1-8
scripts/mod/sumversion.c
···330330 goto out;331331 }332332333333- /* There will be a line like so:334334- deps_drivers/net/dummy.o := \335335- drivers/net/dummy.c \336336- $(wildcard include/config/net/fastroute.h) \337337- include/linux/module.h \338338-339339- Sum all files in the same dir or subdirs.340340- */333333+ /* Sum all files in the same dir or subdirs. */341334 while ((line = get_next_line(&pos, file, flen)) != NULL) {342335 char* p = line;343336
+1-1
scripts/split-man.pl
···11#!/usr/bin/perl22# SPDX-License-Identifier: GPL-2.033#44-# Author: Mauro Carvalho Chehab <mchehab@s-opensource.com>44+# Author: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>55#66# Produce manpages from kernel-doc.77# See Documentation/doc-guide/kernel-doc.rst for instructions
+2
sound/core/pcm_compat.c
···423423 return -ENOTTY;424424 if (substream->stream != dir)425425 return -EINVAL;426426+ if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN)427427+ return -EBADFD;426428427429 if ((ch = substream->runtime->channels) > 128)428430 return -EINVAL;
+2-2
sound/core/seq/seq_virmidi.c
···174174 }175175 return;176176 }177177+ spin_lock_irqsave(&substream->runtime->lock, flags);177178 if (vmidi->event.type != SNDRV_SEQ_EVENT_NONE) {178179 if (snd_seq_kernel_client_dispatch(vmidi->client, &vmidi->event, in_atomic(), 0) < 0)179179- return;180180+ goto out;180181 vmidi->event.type = SNDRV_SEQ_EVENT_NONE;181182 }182182- spin_lock_irqsave(&substream->runtime->lock, flags);183183 while (1) {184184 count = __snd_rawmidi_transmit_peek(substream, buf, sizeof(buf));185185 if (count <= 0)
···773773 u32 cycle;774774 unsigned int packets;775775776776- s->max_payload_length = amdtp_stream_get_max_payload(s);777777-778776 /*779777 * For in-stream, first packet has come.780778 * For out-stream, prepared to transmit first packet···876878 }877879878880 amdtp_stream_update(s);881881+882882+ if (s->direction == AMDTP_IN_STREAM)883883+ s->max_payload_length = amdtp_stream_get_max_payload(s);879884880885 if (s->flags & CIP_NO_HEADER)881886 s->tag = TAG_NO_CIP_HEADER;
···1063106310641064static int cmd_load(char *arg)10651065{10661066- char *subcmd, *cont, *tmp = strdup(arg);10661066+ char *subcmd, *cont = NULL, *tmp = strdup(arg);10671067 int ret = CMD_OK;1068106810691069 subcmd = strtok_r(tmp, " ", &cont);···10731073 bpf_reset();10741074 bpf_reset_breakpoints();1075107510761076- ret = cmd_load_bpf(cont);10761076+ if (!cont)10771077+ ret = CMD_ERR;10781078+ else10791079+ ret = cmd_load_bpf(cont);10771080 } else if (matches(subcmd, "pcap") == 0) {10781081 ret = cmd_load_pcap(cont);10791082 } else {
+1
tools/power/acpi/Makefile.config
···5656# to compile vs uClibc, that can be done here as well.5757CROSS = #/usr/i386-linux-uclibc/usr/bin/i386-uclibc-5858CROSS_COMPILE ?= $(CROSS)5959+LD = $(CC)5960HOSTCC = gcc60616162# check if compiler option is supported
+2-2
tools/testing/selftests/bpf/test_progs.c
···1108110811091109 assert(system("dd if=/dev/urandom of=/dev/zero count=4 2> /dev/null")11101110 == 0);11111111- assert(system("./urandom_read if=/dev/urandom of=/dev/zero count=4 2> /dev/null") == 0);11111111+ assert(system("./urandom_read") == 0);11121112 /* disable stack trace collection */11131113 key = 0;11141114 val = 1;···11581158 } while (bpf_map_get_next_key(stackmap_fd, &previous_key, &key) == 0);1159115911601160 CHECK(build_id_matches < 1, "build id match",11611161- "Didn't find expected build ID from the map");11611161+ "Didn't find expected build ID from the map\n");1162116211631163disable_pmu:11641164 ioctl(pmu_fd, PERF_EVENT_IOC_DISABLE);
+4-4
tools/testing/selftests/lib.mk
···20202121.ONESHELL:2222define RUN_TESTS2323- @export KSFT_TAP_LEVEL=`echo 1`;2424- @test_num=`echo 0`;2525- @echo "TAP version 13";2626- @for TEST in $(1); do \2323+ @export KSFT_TAP_LEVEL=`echo 1`; \2424+ test_num=`echo 0`; \2525+ echo "TAP version 13"; \2626+ for TEST in $(1); do \2727 BASENAME_TEST=`basename $$TEST`; \2828 test_num=`echo $$test_num+1 | bc`; \2929 echo "selftests: $$BASENAME_TEST"; \
···423423 * We cannot rely on the vgic maintenance interrupt to be424424 * delivered synchronously. This means we can only use it to425425 * exit the VM, and we perform the handling of EOIed426426- * interrupts on the exit path (see vgic_process_maintenance).426426+ * interrupts on the exit path (see vgic_fold_lr_state).427427 */428428 return IRQ_HANDLED;429429}
+8-2
virt/kvm/arm/vgic/vgic-mmio.c
···289289 irq->vcpu->cpu != -1) /* VCPU thread is running */290290 cond_resched_lock(&irq->irq_lock);291291292292- if (irq->hw)292292+ if (irq->hw) {293293 vgic_hw_irq_change_active(vcpu, irq, active, !requester_vcpu);294294- else294294+ } else {295295+ u32 model = vcpu->kvm->arch.vgic.vgic_model;296296+295297 irq->active = active;298298+ if (model == KVM_DEV_TYPE_ARM_VGIC_V2 &&299299+ active && vgic_irq_is_sgi(irq->intid))300300+ irq->active_source = requester_vcpu->vcpu_id;301301+ }296302297303 if (irq->active)298304 vgic_queue_irq_unlock(vcpu->kvm, irq, flags);
+22-16
virt/kvm/arm/vgic/vgic-v2.c
···3737 vgic_v2_write_lr(i, 0);3838}39394040-void vgic_v2_set_npie(struct kvm_vcpu *vcpu)4141-{4242- struct vgic_v2_cpu_if *cpuif = &vcpu->arch.vgic_cpu.vgic_v2;4343-4444- cpuif->vgic_hcr |= GICH_HCR_NPIE;4545-}4646-4740void vgic_v2_set_underflow(struct kvm_vcpu *vcpu)4841{4942 struct vgic_v2_cpu_if *cpuif = &vcpu->arch.vgic_cpu.vgic_v2;···6471 int lr;6572 unsigned long flags;66736767- cpuif->vgic_hcr &= ~(GICH_HCR_UIE | GICH_HCR_NPIE);7474+ cpuif->vgic_hcr &= ~GICH_HCR_UIE;68756976 for (lr = 0; lr < vgic_cpu->used_lrs; lr++) {7077 u32 val = cpuif->vgic_lr[lr];7171- u32 intid = val & GICH_LR_VIRTUALID;7878+ u32 cpuid, intid = val & GICH_LR_VIRTUALID;7279 struct vgic_irq *irq;8080+8181+ /* Extract the source vCPU id from the LR */8282+ cpuid = val & GICH_LR_PHYSID_CPUID;8383+ cpuid >>= GICH_LR_PHYSID_CPUID_SHIFT;8484+ cpuid &= 7;73857486 /* Notify fds when the guest EOI'ed a level-triggered SPI */7587 if (lr_signals_eoi_mi(val) && vgic_valid_spi(vcpu->kvm, intid))···8890 /* Always preserve the active bit */8991 irq->active = !!(val & GICH_LR_ACTIVE_BIT);90929393+ if (irq->active && vgic_irq_is_sgi(intid))9494+ irq->active_source = cpuid;9595+9196 /* Edge is the only case where we preserve the pending bit */9297 if (irq->config == VGIC_CONFIG_EDGE &&9398 (val & GICH_LR_PENDING_BIT)) {9499 irq->pending_latch = true;951009696- if (vgic_irq_is_sgi(intid)) {9797- u32 cpuid = val & GICH_LR_PHYSID_CPUID;9898-9999- cpuid >>= GICH_LR_PHYSID_CPUID_SHIFT;101101+ if (vgic_irq_is_sgi(intid))100102 irq->source |= (1 << cpuid);101101- }102103 }103104104105 /*···149152 u32 val = irq->intid;150153 bool allow_pending = true;151154152152- if (irq->active)155155+ if (irq->active) {153156 val |= GICH_LR_ACTIVE_BIT;157157+ if (vgic_irq_is_sgi(irq->intid))158158+ val |= irq->active_source << GICH_LR_PHYSID_CPUID_SHIFT;159159+ if (vgic_irq_is_multi_sgi(irq)) {160160+ allow_pending = false;161161+ val |= GICH_LR_EOI;162162+ }163163+ }154164155165 if (irq->hw) {156166 val |= GICH_LR_HW;···194190 BUG_ON(!src);195191 val |= (src - 1) << GICH_LR_PHYSID_CPUID_SHIFT;196192 irq->source &= ~(1 << (src - 1));197197- if (irq->source)193193+ if (irq->source) {198194 irq->pending_latch = true;195195+ val |= GICH_LR_EOI;196196+ }199197 }200198 }201199
+29-20
virt/kvm/arm/vgic/vgic-v3.c
···2727static bool common_trap;2828static bool gicv4_enable;29293030-void vgic_v3_set_npie(struct kvm_vcpu *vcpu)3131-{3232- struct vgic_v3_cpu_if *cpuif = &vcpu->arch.vgic_cpu.vgic_v3;3333-3434- cpuif->vgic_hcr |= ICH_HCR_NPIE;3535-}3636-3730void vgic_v3_set_underflow(struct kvm_vcpu *vcpu)3831{3932 struct vgic_v3_cpu_if *cpuif = &vcpu->arch.vgic_cpu.vgic_v3;···4855 int lr;4956 unsigned long flags;50575151- cpuif->vgic_hcr &= ~(ICH_HCR_UIE | ICH_HCR_NPIE);5858+ cpuif->vgic_hcr &= ~ICH_HCR_UIE;52595360 for (lr = 0; lr < vgic_cpu->used_lrs; lr++) {5461 u64 val = cpuif->vgic_lr[lr];5555- u32 intid;6262+ u32 intid, cpuid;5663 struct vgic_irq *irq;6464+ bool is_v2_sgi = false;57655858- if (model == KVM_DEV_TYPE_ARM_VGIC_V3)6666+ cpuid = val & GICH_LR_PHYSID_CPUID;6767+ cpuid >>= GICH_LR_PHYSID_CPUID_SHIFT;6868+6969+ if (model == KVM_DEV_TYPE_ARM_VGIC_V3) {5970 intid = val & ICH_LR_VIRTUAL_ID_MASK;6060- else7171+ } else {6172 intid = val & GICH_LR_VIRTUALID;7373+ is_v2_sgi = vgic_irq_is_sgi(intid);7474+ }62756376 /* Notify fds when the guest EOI'ed a level-triggered IRQ */6477 if (lr_signals_eoi_mi(val) && vgic_valid_spi(vcpu->kvm, intid))···8081 /* Always preserve the active bit */8182 irq->active = !!(val & ICH_LR_ACTIVE_BIT);82838484+ if (irq->active && is_v2_sgi)8585+ irq->active_source = cpuid;8686+8387 /* Edge is the only case where we preserve the pending bit */8488 if (irq->config == VGIC_CONFIG_EDGE &&8589 (val & ICH_LR_PENDING_BIT)) {8690 irq->pending_latch = true;87918888- if (vgic_irq_is_sgi(intid) &&8989- model == KVM_DEV_TYPE_ARM_VGIC_V2) {9090- u32 cpuid = val & GICH_LR_PHYSID_CPUID;9191-9292- cpuid >>= GICH_LR_PHYSID_CPUID_SHIFT;9292+ if (is_v2_sgi)9393 irq->source |= (1 << cpuid);9494- }9594 }96959796 /*···130133{131134 u32 model = vcpu->kvm->arch.vgic.vgic_model;132135 u64 val = irq->intid;133133- bool allow_pending = true;136136+ bool allow_pending = true, is_v2_sgi;134137135135- if (irq->active)138138+ is_v2_sgi = (vgic_irq_is_sgi(irq->intid) &&139139+ model == KVM_DEV_TYPE_ARM_VGIC_V2);140140+141141+ if (irq->active) {136142 val |= ICH_LR_ACTIVE_BIT;143143+ if (is_v2_sgi)144144+ val |= irq->active_source << GICH_LR_PHYSID_CPUID_SHIFT;145145+ if (vgic_irq_is_multi_sgi(irq)) {146146+ allow_pending = false;147147+ val |= ICH_LR_EOI;148148+ }149149+ }137150138151 if (irq->hw) {139152 val |= ICH_LR_HW;···181174 BUG_ON(!src);182175 val |= (src - 1) << GICH_LR_PHYSID_CPUID_SHIFT;183176 irq->source &= ~(1 << (src - 1));184184- if (irq->source)177177+ if (irq->source) {185178 irq->pending_latch = true;179179+ val |= ICH_LR_EOI;180180+ }186181 }187182 }188183
+7-23
virt/kvm/arm/vgic/vgic.c
···725725 vgic_v3_set_underflow(vcpu);726726}727727728728-static inline void vgic_set_npie(struct kvm_vcpu *vcpu)729729-{730730- if (kvm_vgic_global_state.type == VGIC_V2)731731- vgic_v2_set_npie(vcpu);732732- else733733- vgic_v3_set_npie(vcpu);734734-}735735-736728/* Requires the ap_list_lock to be held. */737729static int compute_ap_list_depth(struct kvm_vcpu *vcpu,738730 bool *multi_sgi)···738746 DEBUG_SPINLOCK_BUG_ON(!spin_is_locked(&vgic_cpu->ap_list_lock));739747740748 list_for_each_entry(irq, &vgic_cpu->ap_list_head, ap_list) {749749+ int w;750750+741751 spin_lock(&irq->irq_lock);742752 /* GICv2 SGIs can count for more than one... */743743- if (vgic_irq_is_sgi(irq->intid) && irq->source) {744744- int w = hweight8(irq->source);745745-746746- count += w;747747- *multi_sgi |= (w > 1);748748- } else {749749- count++;750750- }753753+ w = vgic_irq_get_lr_count(irq);751754 spin_unlock(&irq->irq_lock);755755+756756+ count += w;757757+ *multi_sgi |= (w > 1);752758 }753759 return count;754760}···757767 struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu;758768 struct vgic_irq *irq;759769 int count;760760- bool npie = false;761770 bool multi_sgi;762771 u8 prio = 0xff;763772···786797 if (likely(vgic_target_oracle(irq) == vcpu)) {787798 vgic_populate_lr(vcpu, irq, count++);788799789789- if (irq->source) {790790- npie = true;800800+ if (irq->source)791801 prio = irq->priority;792792- }793802 }794803795804 spin_unlock(&irq->irq_lock);···799812 break;800813 }801814 }802802-803803- if (npie)804804- vgic_set_npie(vcpu);805815806816 vcpu->arch.vgic_cpu.used_lrs = count;807817
+14
virt/kvm/arm/vgic/vgic.h
···110110 return irq->config == VGIC_CONFIG_LEVEL && irq->hw;111111}112112113113+static inline int vgic_irq_get_lr_count(struct vgic_irq *irq)114114+{115115+ /* Account for the active state as an interrupt */116116+ if (vgic_irq_is_sgi(irq->intid) && irq->source)117117+ return hweight8(irq->source) + irq->active;118118+119119+ return irq_is_pending(irq) || irq->active;120120+}121121+122122+static inline bool vgic_irq_is_multi_sgi(struct vgic_irq *irq)123123+{124124+ return vgic_irq_get_lr_count(irq) > 1;125125+}126126+113127/*114128 * This struct provides an intermediate representation of the fields contained115129 * in the GICH_VMCR and ICH_VMCR registers, such that code exporting the GIC